def testcreate(self): masspay.create( 'Balance', {frozenset({ 'amount': 10.00, 'destination': '812-123-1111' })}, alternate_token='AN OAUTH TOKEN', dwollaparse='dwolla') masspay.r._post.assert_any_call( '/masspay', { 'fundsSource': 'Balance', 'items': set([frozenset(['amount', 'destination'])]), 'pin': 1234 }, { 'alternate_token': 'AN OAUTH TOKEN', 'dwollaparse': 'dwolla' })
constants.client_id = "zbDwIC0dWCVU7cQtfvGwVwVjvxwQfjaTgkVi+FZOmKqPBzK5JG" constants.client_secret = "ckmgwJz9h/fZ09unyXxpupCyrmAMe0bnUiMHF/0+SDaR9RHe99" constants.access_token = "aK6DdCVlIsR1hKvTbp8VCwnvci8cwaTLlW9edtbHJVmKoopnoe" constants.pin = 1234 # Example 1: Create a MassPay job with two items to # the Balance of the user associated with the current # OAuth token. info = masspay.create('Balance', { { 'amount': 1.00, 'destination': '812-197-4121' }, { 'amount': 2.00, 'destination': '812-174-9528' } }) print(info) # Return: # { # "Id": "47fe2f7c-8d6d-4f98-bcd9-a3100178062f", # "AssumeCosts": true, # "FundingSource": "Balance", # "Total": 3.00, # "Fees": 0, # "CreatedDate": "2014-04-18T05:49:03Z",
def testcreate(self): masspay.create('Balance', {frozenset({'amount': 10.00, 'destination': '812-123-1111'})}) masspay.r._post.assert_any_call('/masspay/', {'fundsSource': 'Balance', 'items': set([frozenset(['amount', 'destination'])]), 'oauth_token': 'AN OAUTH TOKEN', 'pin': 1234})
# 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: Create a MassPay job with two items to # the Balance of the user associated with the current # OAuth token. info = masspay.create( 'Balance', {{ 'amount': 1.00, 'destination': '812-197-4121' }, { 'amount': 2.00, 'destination': '812-174-9528' }}) print(info) # Return: # { # "Id": "47fe2f7c-8d6d-4f98-bcd9-a3100178062f", # "AssumeCosts": true, # "FundingSource": "Balance", # "Total": 3.00, # "Fees": 0, # "CreatedDate": "2014-04-18T05:49:03Z", # "Status": "queued", # "ItemSummary": {
def testcreate(self): masspay.create('Balance', {frozenset({'amount': 10.00, 'destination': '812-123-1111'})}, alternate_token='AN OAUTH TOKEN', dwollaparse='dwolla') masspay.r._post.assert_any_call('/masspay', {'fundsSource': 'Balance', 'items': set([frozenset(['amount', 'destination'])]), 'pin': 1234}, {'alternate_token':'AN OAUTH TOKEN', 'dwollaparse':'dwolla'})