Skip to content

Commit

Permalink
Add support for retrieving a Checkout Session
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe committed Mar 6, 2019
1 parent f5a2f49 commit 63078a5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resources/Checkout/Sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ var StripeResource = require('../../StripeResource');

module.exports = StripeResource.extend({
path: 'checkout/sessions',
includeBasic: ['create'],
includeBasic: ['create', 'retrieve'],
})
12 changes: 12 additions & 0 deletions test/resources/Checkout/Sessions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,17 @@ describe('Checkout', function () {
});
});
});

describe('retrieve', function() {
it('Sends the correct request', function() {
stripe.checkout.sessions.retrieve('cs_123');
expect(stripe.LAST_REQUEST).to.deep.equal({
method: 'GET',
url: '/v1/checkout/sessions/cs_123',
data: {},
headers: {},
});
});
});
});
});

0 comments on commit 63078a5

Please sign in to comment.