Skip to content

Commit 2cbd3f5

Browse files
justmobilizejoyzheng
authored andcommitted
Add support for Dwolla processor token (#126)
1 parent 884c5b6 commit 2cbd3f5

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

plaid/api/processor.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,25 @@ def stripeBankAccountTokenCreate(self, access_token, account_id):
99
Create a Stripe bank_account token for a given account ID
1010
(`HTTP docs <https://plaid.com/docs/link/stripe>`__)
1111
12-
:param str public_token:
12+
:param str access_token:
1313
:param str account_id:
1414
'''
1515
return self.client.post('/processor/stripe/bank_account_token/create',
1616
{
1717
'access_token': access_token,
1818
'account_id': account_id,
1919
})
20+
21+
def dwollaBankAccountTokenCreate(self, access_token, account_id):
22+
'''
23+
Create a Dwolla processor token for a given account ID
24+
(`HTTP docs <https://plaid.com/docs/link/dwolla>`__)
25+
26+
:param str access_token:
27+
:param str account_id:
28+
'''
29+
return self.client.post('/processor/dwolla/processor_token/create',
30+
{
31+
'access_token': access_token,
32+
'account_id': account_id,
33+
})

tests/integration/test_processor.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,20 @@
1212
create_client
1313
)
1414

15-
def test_processor_token():
15+
16+
def test_stripe_processor_token():
1617
client = create_client()
1718
# Just test the failure case - behavior here depends on the API keys used
1819
with pytest.raises(InvalidRequestError) as e:
1920
client.Processor.stripeBankAccountTokenCreate(
2021
'fakeAccessToken', 'fakeAccountId')
2122
assert e.code == 'INVALID_INPUT'
23+
24+
25+
def test_dwolla_processor_token():
26+
client = create_client()
27+
# Just test the failure case - behavior here depends on the API keys used
28+
with pytest.raises(InvalidRequestError) as e:
29+
client.Processor.dwollaBankAccountTokenCreate(
30+
'fakeAccessToken', 'fakeAccountId')
31+
assert e.code == 'INVALID_INPUT'

0 commit comments

Comments
 (0)