Example #1
0
 def testget(self):
     fundingsources.get(a='parameter',
                        alternate_token='AN OAUTH TOKEN',
                        dwollaparse='dwolla')
     fundingsources.r._get.assert_any_call(
         '/fundingsources', {'a': 'parameter'}, {
             'alternate_token': 'AN OAUTH TOKEN',
             'dwollaparse': 'dwolla'
         })
def dwolla_get_sources(user_or_order, event):
    dwolla_prep(event.api_type)
    access_token = dwolla_get_token(user_or_order, event.api_type)
    if event.api_type == LIVE:
        destination = event.organization.dwolla_user_id
    else:
        destination = event.organization.dwolla_test_user_id
    return fundingsources.get(alternate_token=access_token, params={"destinationid": destination, "verified": True})
Example #3
0
def dwolla_get_sources(account, event):
    if account.api_type != event.api_type:
        raise ValueError("Account and event API types do not match.")
    org_account = event.organization.get_dwolla_account(event.api_type)
    if not org_account or not org_account.is_connected():
        raise ValueError("Event is not connected to dwolla.")
    dwolla_prep(account.api_type)
    access_token = account.get_token()
    destination = org_account.user_id
    return fundingsources.get(alternate_token=access_token,
                              params={
                                  'destinationid': destination,
                                  'verified': True
                              })
 def testget(self):
     fundingsources.get(a='parameter')
     fundingsources.r._get.assert_any_call('/fundingsources', {'a': 'parameter', 'oauth_token': 'AN OAUTH TOKEN'}, dwollaparse='dwolla')
Example #5
0
print(fundingsources.info('12345678'))
# Return:
# {
# "Id": "12345678",
# "Name": "Donations Payout Account - Checking",
# "Type": "Checking",
# "Verified": true,
# "ProcessingType": "FiSync"
# }


# Example 2: Get a list of funding sources associated
# with the account under the current OAuth token

print(fundingsources.get())
# Return:
# [
# {
#     "Id": "Balance",
#     "Name": "My Dwolla Balance",
#     "Type": "",
#     "Verified": "true",
#     "ProcessingType": ""
# },
# {
#     "Id": "c58bb9f7f1d51d5547e1987a2833f4fa",
#     "Name": "Donations Collection Fund - Savings",
#     "Type": "Savings",
#     "Verified": "true",
#     "ProcessingType": "ACH"
Example #6
0
# Example 1: Get information about a funding ID

print(fundingsources.info('12345678'))
# Return:
# {
# "Id": "12345678",
# "Name": "Donations Payout Account - Checking",
# "Type": "Checking",
# "Verified": true,
# "ProcessingType": "FiSync"
# }

# Example 2: Get a list of funding sources associated
# with the account under the current OAuth token

print(fundingsources.get())
# Return:
# [
# {
#     "Id": "Balance",
#     "Name": "My Dwolla Balance",
#     "Type": "",
#     "Verified": "true",
#     "ProcessingType": ""
# },
# {
#     "Id": "c58bb9f7f1d51d5547e1987a2833f4fa",
#     "Name": "Donations Collection Fund - Savings",
#     "Type": "Savings",
#     "Verified": "true",
#     "ProcessingType": "ACH"
Example #7
0
print fundingsources.info('12345678')
# Return:
# {
# "Id": "12345678",
# "Name": "Donations Payout Account - Checking",
# "Type": "Checking",
# "Verified": true,
# "ProcessingType": "FiSync"
# }


# Example 2: Get a list of funding sources associated
# with the account under the current OAuth token

print fundingsources.get()
# Return:
# [
# {
#     "Id": "Balance",
#     "Name": "My Dwolla Balance",
#     "Type": "",
#     "Verified": "true",
#     "ProcessingType": ""
# },
# {
#     "Id": "c58bb9f7f1d51d5547e1987a2833f4fa",
#     "Name": "Donations Collection Fund - Savings",
#     "Type": "Savings",
#     "Verified": "true",
#     "ProcessingType": "ACH"