diff --git a/lib/resources/Sigma/ScheduledQueryRun.js b/lib/resources/Sigma/ScheduledQueryRun.js new file mode 100644 index 0000000000..bc80b40040 --- /dev/null +++ b/lib/resources/Sigma/ScheduledQueryRun.js @@ -0,0 +1,9 @@ +'use strict'; + +var StripeResource = require('../../StripeResource'); + +module.exports = StripeResource.extend({ + path: 'sigma/scheduled_query_runs', + + includeBasic: ['list', 'retrieve'], +}); diff --git a/lib/stripe.js b/lib/stripe.js index d5e6debe9b..e05802efcb 100644 --- a/lib/stripe.js +++ b/lib/stripe.js @@ -83,6 +83,9 @@ var resources = { Transactions: require('./resources/Issuing/Transactions'), Disputes: require('./resources/Issuing/Disputes'), }), + Sigma: resourceNamespace('sigma', { + ScheduledQueryRuns: require('./resources/Sigma/ScheduledQueryRun'), + }), }; Stripe.StripeResource = require('./StripeResource'); diff --git a/test/resources/Sigma/ScheduledQueryRun.spec.js b/test/resources/Sigma/ScheduledQueryRun.spec.js new file mode 100644 index 0000000000..33a2d67f65 --- /dev/null +++ b/test/resources/Sigma/ScheduledQueryRun.spec.js @@ -0,0 +1,32 @@ +'use strict'; + +var stripe = require('../../testUtils').getSpyableStripe(); +var expect = require('chai').expect; + +describe('Sigma', function () { + describe('ScheduledQueryRun Resource', function() { + describe('retrieve', function() { + it('Sends the correct request', function() { + stripe.sigma.scheduledQueryRuns.retrieve('sqr_123'); + expect(stripe.LAST_REQUEST).to.deep.equal({ + method: 'GET', + url: '/v1/sigma/scheduled_query_runs/sqr_123', + data: {}, + headers: {}, + }); + }); + }); + + describe('list', function() { + it('Sends the correct request', function() { + stripe.sigma.scheduledQueryRuns.list(); + expect(stripe.LAST_REQUEST).to.deep.equal({ + method: 'GET', + url: '/v1/sigma/scheduled_query_runs', + data: {}, + headers: {}, + }); + }); + }); + }); +});