File tree 3 files changed +37
-0
lines changed
3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ module . exports = require ( '../StripeResource' ) . extend ( {
4
+ path : 'account_links' ,
5
+ includeBasic : [ 'create' ] ,
6
+ } ) ;
7
+
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ var resources = {
32
32
// Support Accounts for consistency, Account for backwards compat
33
33
Account : require ( './resources/Accounts' ) ,
34
34
Accounts : require ( './resources/Accounts' ) ,
35
+ AccountLinks : require ( './resources/AccountLinks' ) ,
35
36
ApplePayDomains : require ( './resources/ApplePayDomains' ) ,
36
37
ApplicationFees : require ( './resources/ApplicationFees' ) ,
37
38
Balance : require ( './resources/Balance' ) ,
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ var stripe = require ( '../../testUtils' ) . getSpyableStripe ( ) ;
4
+ var expect = require ( 'chai' ) . expect ;
5
+
6
+ describe ( 'AccountLinks Resource' , function ( ) {
7
+ describe ( 'create' , function ( ) {
8
+ it ( 'Sends the correct request' , function ( ) {
9
+ stripe . accountLinks . create ( {
10
+ account : 'acct_123' ,
11
+ failure_url : 'https://stripe.com/failure' ,
12
+ success_url : 'https://stripe.com/success' ,
13
+ type : 'custom_account_verification' ,
14
+ } ) ;
15
+
16
+ expect ( stripe . LAST_REQUEST ) . to . deep . equal ( {
17
+ method : 'POST' ,
18
+ url : '/v1/account_links' ,
19
+ headers : { } ,
20
+ data : {
21
+ account : 'acct_123' ,
22
+ failure_url : 'https://stripe.com/failure' ,
23
+ success_url : 'https://stripe.com/success' ,
24
+ type : 'custom_account_verification' ,
25
+ } ,
26
+ } ) ;
27
+ } ) ;
28
+ } ) ;
29
+ } ) ;
You can’t perform that action at this time.
0 commit comments