forked from stripe/stripe-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request stripe#724 from stripe/remi/codegen-77f0486
Add support for `Mandate`
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
const StripeResource = require('../StripeResource'); | ||
|
||
module.exports = StripeResource.extend({ | ||
path: 'mandates', | ||
|
||
includeBasic: ['retrieve'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
const stripe = require('../../testUtils').getSpyableStripe(); | ||
const expect = require('chai').expect; | ||
|
||
const MANDATE_TEST_ID = 'mandate_123'; | ||
|
||
describe('Mandate Resource', () => { | ||
describe('retrieve', () => { | ||
it('Sends the correct request', () => { | ||
stripe.mandates.retrieve(MANDATE_TEST_ID); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'GET', | ||
url: `/v1/mandates/${MANDATE_TEST_ID}`, | ||
data: {}, | ||
headers: {}, | ||
}); | ||
}); | ||
}); | ||
}); |