Example #1
0
 def testtoggleautowithdrawalstatus(self):
     accounts.toggleautowithdrawalstatus(True,
                                         '123456',
                                         alternate_token='AN OAUTH TOKEN',
                                         dwollaparse='dwolla')
     accounts.r._post.assert_any_call('/accounts/features/auto_withdrawl', {
         'enabled': True,
         'fundingId': '123456'
     }, {
         'alternate_token': 'AN OAUTH TOKEN',
         'dwollaparse': 'dwolla'
     })
Example #2
0

# Example 4: Get users near a certain geographical
# location

print(accounts.nearby(40.7127, 74.0059))
# Return:
# [{
#     "Id": "812-687-7049",
#     "Image": "https://www.dwolla.com/avatars/812-687-7049",
#     "Name": "Gordon Zheng",
#     "Latitude": 40.708448,
#     "Longitude": -74.014429,
#     "Delta": 114.72287700000001
# }]


# Example 5: Get the auto-withdrawal status of the user
# associated with the current OAuth token.

print(accounts.autowithdrawalstatus())
# Return:
# {u'Enabled': False, u'FundingId': u''}


# Example 6: Toggle the auto-withdrawal status of an account
# under the Dwolla user associated with the current OAuth token.

print(accounts.toggleautowithdrawalstatus(True, '12345678'))
# Return:
# "Enabled"
Example #3
0
 def testtoggleautowithdrawalstatus(self):
     accounts.toggleautowithdrawalstatus(True, '123456', alternate_token='AN OAUTH TOKEN', dwollaparse='dwolla')
     accounts.r._post.assert_any_call('/accounts/features/auto_withdrawl', {'enabled': True, 'fundingId': '123456'}, {'alternate_token':'AN OAUTH TOKEN', 'dwollaparse':'dwolla'})
Example #4
0
print(accounts.balance())
# Return:
# 21.97

# Example 4: Get users near a certain geographical
# location

print(accounts.nearby(40.7127, 74.0059))
# Return:
# [{
#     "Id": "812-687-7049",
#     "Image": "https://www.dwolla.com/avatars/812-687-7049",
#     "Name": "Gordon Zheng",
#     "Latitude": 40.708448,
#     "Longitude": -74.014429,
#     "Delta": 114.72287700000001
# }]

# Example 5: Get the auto-withdrawal status of the user
# associated with the current OAuth token.

print(accounts.autowithdrawalstatus())
# Return:
# {u'Enabled': False, u'FundingId': u''}

# Example 6: Toggle the auto-withdrawal status of an account
# under the Dwolla user associated with the current OAuth token.

print(accounts.toggleautowithdrawalstatus(True, '12345678'))
# Return:
# "Enabled"
Example #5
0
 def testtoggleautowithdrawalstatus(self):
     accounts.toggleautowithdrawalstatus(True, '123456')
     accounts.r._post.assert_any_call('/accounts/features/auto_withdrawl', {'enabled': True, 'oauth_token': 'AN OAUTH TOKEN', 'fundingId': '123456'})