示例#1
0
 def testwithdraw(self):
     fundingsources.withdraw(20.50,
                             '123456',
                             alternate_token='AN OAUTH TOKEN',
                             dwollaparse='dwolla')
     fundingsources.r._post.assert_any_call(
         '/fundingsources/123456/withdraw', {
             'amount': 20.5,
             'pin': 1234
         }, {
             'alternate_token': 'AN OAUTH TOKEN',
             'dwollaparse': 'dwolla'
         })
 def testwithdraw(self):
     fundingsources.withdraw(20.50, '123456')
     fundingsources.r._post.assert_any_call('/fundingsources/123456/withdraw', {'amount': 20.5, 'oauth_token': 'AN OAUTH TOKEN', 'pin': 1234}, dwollaparse='dwolla')
示例#3
0
print(fundingsources.verify(0.04, 0.02, '12345678'))
# Return:
# {
#         "Id": "12345678",
#         "Name": "My Checking Account - Checking",
#         "Type": "Checking",
#         "Verified": true,
#         "ProcessingType": "ACH"
# }


# Example 5: Withdraw $5 from Dwolla to funding ID
# '12345678'.

print(fundingsources.withdraw(5.00, '12345678'))
# Return: 
# { 
#         "Id": 12345678,
#         "Amount": 5,
#         "Date": "2014-09-05T06:40:56Z",
#         "Type": "withdrawal",
#         "UserType": "Dwolla",
#         "DestinationId": "XXX9999",
#         "DestinationName": "Blah",
#         "Destination": { 
#             "Id": "XXX9999", 
#             "Name": "Blah", 
#             "Type": "Dwolla", 
#             "Image": ""
#         },
示例#4
0
# '12345678' is the account number.

print(fundingsources.verify(0.04, 0.02, '12345678'))
# Return:
# {
#         "Id": "12345678",
#         "Name": "My Checking Account - Checking",
#         "Type": "Checking",
#         "Verified": true,
#         "ProcessingType": "ACH"
# }

# Example 5: Withdraw $5 from Dwolla to funding ID
# '12345678'.

print(fundingsources.withdraw(5.00, '12345678'))
# Return:
# {
#         "Id": 12345678,
#         "Amount": 5,
#         "Date": "2014-09-05T06:40:56Z",
#         "Type": "withdrawal",
#         "UserType": "Dwolla",
#         "DestinationId": "XXX9999",
#         "DestinationName": "Blah",
#         "Destination": {
#             "Id": "XXX9999",
#             "Name": "Blah",
#             "Type": "Dwolla",
#             "Image": ""
#         },