コード例 #1
0
ファイル: accounts.py プロジェクト: Dwolla/dwolla-python
  The following is a quick-start example for the account endpoints.
'''

from dwolla import accounts, 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"

# Example 1: Get basic information for a user via
# their Dwolla ID

print(accounts.basic('812-202-3784'))
# Return: {u'Latitude': 0, u'Id': u'812-202-3784', u'Longitude': 0, u'Name': u'David Stancu'}


# Example 2: Get full account information for
# the user associated with the current OAuth token

print(accounts.full())
# Return: 
# {u'City': u'New York', u'Name': u'David Stancu', u'Longitude': 0, u'State': u'NY', u'Latitude': 0, u'Type': u'Personal', u'Id': u'812-202-3784'}


# Example 3: Get the balance of the account for
# the user associated with the current OAuth token

print(accounts.balance())
コード例 #2
0
ファイル: accounts.py プロジェクト: mez/dwolla-python
  The following is a quick-start example for the account endpoints.
'''

from dwolla import accounts, 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"

# Example 1: Get basic information for a user via
# their Dwolla ID

print accounts.basic('812-202-3784')
# Return: {u'Latitude': 0, u'Id': u'812-202-3784', u'Longitude': 0, u'Name': u'David Stancu'}


# Example 2: Get full account information for
# the user associated with the current OAuth token

print accounts.full()
# Return: 
# {u'City': u'New York', u'Name': u'David Stancu', u'Longitude': 0, u'State': u'NY', u'Latitude': 0, u'Type': u'Personal', u'Id': u'812-202-3784'}


# Example 3: Get the balance of the account for
# the user associated with the current OAuth token

print accounts.balance()
コード例 #3
0
ファイル: testAccounts.py プロジェクト: Dwolla/dwolla-python
 def testbasic(self):
     accounts.basic('123456', dwollaparse='dwolla')
     accounts.r._get_without_token.assert_any_call('/users/123456', {'client_secret': 'SOME ID', 'client_id': 'SOME ID'}, {'dwollaparse': 'dwolla'})
コード例 #4
0
 def testbasic(self):
     accounts.basic('123456', dwollaparse='dwolla')
     accounts.r._get_without_token.assert_any_call('/users/123456', {
         'client_secret': 'SOME ID',
         'client_id': 'SOME ID'
     }, {'dwollaparse': 'dwolla'})
コード例 #5
0
  The following is a quick-start example for the account endpoints.
'''

from dwolla import accounts, 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"

# Example 1: Get basic information for a user via
# their Dwolla ID

print(accounts.basic('812-202-3784'))
# Return: {u'Latitude': 0, u'Id': u'812-202-3784', u'Longitude': 0, u'Name': u'David Stancu'}

# Example 2: Get full account information for
# the user associated with the current OAuth token

print(accounts.full())
# Return:
# {u'City': u'New York', u'Name': u'David Stancu', u'Longitude': 0, u'State': u'NY', u'Latitude': 0, u'Type': u'Personal', u'Id': u'812-202-3784'}

# Example 3: Get the balance of the account for
# the user associated with the current OAuth token

print(accounts.balance())
# Return:
# 21.97
コード例 #6
0
ファイル: testAccounts.py プロジェクト: mez/dwolla-python
 def testbasic(self):
     accounts.basic('123456')
     accounts.r._get.assert_any_call('/users/123456', {'client_secret': 'SOME ID', 'client_id': 'SOME ID'})