def testschedule(self):
     transactions.schedule('812-111-1234',
                           5.00,
                           '2018-01-01',
                           'abcdefunds',
                           a='parameter',
                           alternate_token='AN OAUTH TOKEN',
                           dwollaparse='dwolla')
     transactions.r._post.assert_any_call(
         '/transactions/scheduled', {
             'a': 'parameter',
             'destinationId': '812-111-1234',
             'amount': 5.0,
             'scheduleDate': '2018-01-01',
             'pin': 1234,
             'fundsSource': 'abcdefunds'
         }, {
             'alternate_token': 'AN OAUTH TOKEN',
             'dwollaparse': 'dwolla'
         })
示例#2
0
 def testschedule(self):
     transactions.schedule('812-111-1234', 5.00, '2018-01-01', 'abcdefunds', a='parameter', alternate_token='AN OAUTH TOKEN', dwollaparse='dwolla')
     transactions.r._post.assert_any_call('/transactions/scheduled', {'a': 'parameter', 'destinationId': '812-111-1234', 'amount': 5.0, 'scheduleDate': '2018-01-01', 'pin': 1234, 'fundsSource': 'abcdefunds'}, {'alternate_token':'AN OAUTH TOKEN', 'dwollaparse':'dwolla'})
示例#3
0

# Example 5: Get transaction statistics for the user
# associated with the current OAuth token.

print(transactions.stats())
# Return:
# {
#     "TransactionsCount": 5,
#     "TransactionsTotal": 116.92
# }

# Example 6: Schedule a transaction for 2018-01-01 with
# amount $5.50

print(transactions.schedule('812-111-1111', 5.50, '2018-01-01', '5da016f7769bcc1de9998a30d194d5a7'))
# Return: 
#     "Id": "3bfaf7fb-b5e9-4a6e-ab09-1ef30d30bbef",
#     "ScheduledDate": "2018-01-01",
#     "ExpectedClearingDate": "2018-01-06",
#     "TransactionId": null,
#     "Amount": 5.50,
#     "FundingSource": "5da016f7769bcc1de9998a30d194d5a7",
#     "AssumeCosts": false,
#     "Destination": {
#         "Id": "812-111-1111",
#         "Name": "Jane Doe",
#         "Type": "Dwolla",
#         "Image": "http://www.dwolla.com/avatars/812-111-1111"
#     },
#     "Status": "scheduled",
示例#4
0
# Example 5: Get transaction statistics for the user
# associated with the current OAuth token.

print(transactions.stats())
# Return:
# {
#     "TransactionsCount": 5,
#     "TransactionsTotal": 116.92
# }

# Example 6: Schedule a transaction for 2018-01-01 with
# amount $5.50

print(
    transactions.schedule('812-111-1111', 5.50, '2018-01-01',
                          '5da016f7769bcc1de9998a30d194d5a7'))
# Return:
#     "Id": "3bfaf7fb-b5e9-4a6e-ab09-1ef30d30bbef",
#     "ScheduledDate": "2018-01-01",
#     "ExpectedClearingDate": "2018-01-06",
#     "TransactionId": null,
#     "Amount": 5.50,
#     "FundingSource": "5da016f7769bcc1de9998a30d194d5a7",
#     "AssumeCosts": false,
#     "Destination": {
#         "Id": "812-111-1111",
#         "Name": "Jane Doe",
#         "Type": "Dwolla",
#         "Image": "http://www.dwolla.com/avatars/812-111-1111"
#     },
#     "Status": "scheduled",