Exemple #1
0
  The following is a quick-start example for the request endpoints.
'''

from dwolla import request, constants

# Configure the library (change these)
constants.sandbox=False

constants.client_id = "zbDwIC0dWCVU7cQtfvGwVwVjvxwQfjaTgkVi+FZOmKqPBzK5JG"
constants.client_secret = "ckmgwJz9h/fZ09unyXxpupCyrmAMe0bnUiMHF/0+SDaR9RHe99"
constants.access_token = "aK6DdCVlIsR1hKvTbp8VCwnvci8cwaTLlW9edtbHJVmKoopnoe"
constants.pin = 1234

# Example 1: Request $5 from 812-740-3809

print request.create('812-740-3809', 5.00)
# Return:
# 1470 (request ID)


# Example 2: Get all pending requests from the user
# associated with the current OAuth token.
print request.get()
# Return:
# [
#         {
#             "Id": 640,
#             "Source": {
#                 "Id": "812-693-9484",
#                 "Name": "Spencer Hunter",
#                 "Type": "Dwolla",
Exemple #2
0
 def testcreate(self):
     request.create('812-123-1234', 5.50, {'a': 'parameter'})
     request.r._post.assert_any_call('/requests/', {'sourceId': '812-123-1234', 'a': 'parameter', 'amount': 5.5, 'oauth_token': 'AN OAUTH TOKEN'})
Exemple #3
0
  The following is a quick-start example for the request endpoints.
'''

from dwolla import request, constants

# Configure the library (change these)
constants.sandbox = False

constants.client_id = "zbDwIC0dWCVU7cQtfvGwVwVjvxwQfjaTgkVi+FZOmKqPBzK5JG"
constants.client_secret = "ckmgwJz9h/fZ09unyXxpupCyrmAMe0bnUiMHF/0+SDaR9RHe99"
constants.access_token = "aK6DdCVlIsR1hKvTbp8VCwnvci8cwaTLlW9edtbHJVmKoopnoe"
constants.pin = 1234

# Example 1: Request $5 from 812-740-3809

print(request.create('812-740-3809', 5.00))
# Return:
# 1470 (request ID)

# Example 2: Get all pending requests from the user
# associated with the current OAuth token.
print(request.get())
# Return:
# [
#         {
#             "Id": 640,
#             "Source": {
#                 "Id": "812-693-9484",
#                 "Name": "Spencer Hunter",
#                 "Type": "Dwolla",
#                 "Image": null