예제 #1
0
 def search(page=1, page_number=10, term=""):
     """
     Query for a batch
         Batch.search(1,10,'test')
     """
     config = Configuration(Configuration.public_key, Configuration.private_key, Configuration.enviroment)
     return Gateway(config).batch.search(page, page_number, term)
예제 #2
0
 def find(term=""):
     """
     Retrieve a balance
         Balances.find()
     """
     config = Configuration(Configuration.public_key, Configuration.private_key, Configuration.enviroment)
     return Gateway(config).balances.find(term)
예제 #3
0
 def find(batch_id):
     """
     Retrieve a batch
         A batch_id is required::
         Batch.find('B-fjeracjmuflh')
     """
     config = Configuration(Configuration.public_key, Configuration.private_key, Configuration.enviroment)
     return Gateway(config).batch.find(batch_id)
예제 #4
0
 def process_batch(batch_id):
     """
     Process a batch
         A batch_id is required::
         Batch.process_batch('B-fjeracjmuflh')
     """
     config = Configuration(Configuration.public_key, Configuration.private_key, Configuration.enviroment)
     return Gateway(config).batch.process_batch(batch_id)
예제 #5
0
 def generate_quote(batch_id):
     """
     Generate a quote for a batch
         A batch_id is required::
         Batch.generate_quote('B-fjeracjmuflh')
     """
     config = Configuration(Configuration.public_key, Configuration.private_key, Configuration.enviroment)
     return Gateway(config).batch.generate_quote(batch_id)
예제 #6
0
 def summary(batch_id):
     """
     Retrieve a summary about a specific batch
         A batch_id is required::
         Batch.summary('B-fjeracjmuflh')
     """
     config = Configuration(Configuration.public_key, Configuration.private_key, Configuration.enviroment)
     return Gateway(config).batch.summary(batch_id)
예제 #7
0
 def delete(batch_id):
     """
     Delete a batch
         A batch_id is required::
         Batch.delete('B-fjeracjmuflh')
     """
     config = Configuration(Configuration.public_key, Configuration.private_key, Configuration.enviroment)
     return Gateway(config).batch.delete(batch_id)
예제 #8
0
 def update(recipient_id, body):
     """
     Update a recipient
         A recipient_id and body are required::
         Recipient.update({'firstName': 'tom'})
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).recipient.update(recipient_id, body)
예제 #9
0
 def find(recipient_id, term=""):
     """
     Retrieve a recipient
         A recipient_id is required::
         Recipient.find('R-fjeracjmuflh')
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).recipient.find(recipient_id, term)
예제 #10
0
 def update(batch_id, body):
     """
     Update a batch
         A batch_id and body are required::
         Batch.update('B-fjeracjmuflh',{"payments":[{"recipient":{"id":"R-3DF7FAF680739541",
         "email":"*****@*****.**"},"sourceAmount":65,"memo":"Salary",
         "sourceCurrency":"CAD"}]})
     """
     config = Configuration(Configuration.public_key, Configuration.private_key, Configuration.enviroment)
     return Gateway(config).batch.update(batch_id, body)
예제 #11
0
 def create(body):
     """
     Create a batch
         A body is required::
         Batch.create(
             {"payments":[{"recipient":{"id":"R-SBAHDK3DK6M7SUEM"},
             "sourceAmount":"65","memo":"","sourceCurrency":"CAD"}]})
     """
     config = Configuration(Configuration.public_key, Configuration.private_key, Configuration.enviroment)
     return Gateway(config).batch.create(body)
예제 #12
0
 def delete(recipient_id):
     """
     Delete a recipient
         A recipient_id is required::
         Recipient.delete('R-fjeracjmuflh')
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).recipient.delete(recipient_id)
예제 #13
0
 def delete(payment_id, batch_id):
     """
     Delete a payment
         A payment_id and batch_id are required::
         Payment.delete('P-dejrtewdsj',B-fjeracjmuflh')
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).payment.delete(payment_id, batch_id)
 def create(recipient_id, body):
     """
     Create a recipient account
         A recipient_id and body are required::
         RecipientAccount.create('R-4625iLug2GKqKZG2WzAf3e','payload')
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).recipient_account.create(recipient_id, body)
예제 #15
0
 def update(payment_id, body, batch_id):
     """
     Update a payment
         A payment_id, batch_id, and body are required::
         Payment.update('B-fjeracjmuflh',{"sourceAmount":"900.90"},'P-jddfjwojd')
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).payment.update(payment_id, body, batch_id)
 def findAll(recipient_id):
     """
     Retrieve all the recipient accounts
         A recipient_id is required::
         RecipientAccount.findAll('R-fjeracjmuflh')
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).recipient_account.findAll(recipient_id)
예제 #17
0
 def create(body):
     """
     Create a recipient
         A body is required::
         Recipient.create({"type": "individual", "firstName": "John",
                                 "lastName": "Smith", "email": "*****@*****.**"})
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).recipient.create(body)
 def delete(recipient_id, recipient_account_id):
     """
     Delete a recipient account
         A recipient_id and recipient_account_id are required::
         RecipientAccount.delete('R-fjeracjmuflh','A-2DQMpN4jurTFn9gRxobx4C')
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).recipient_account.delete(
         recipient_id, recipient_account_id)
예제 #19
0
 def create(body, batch_id):
     """
     Create a payment
         A body and batch_id are required::
         Payment.create(
            {"recipient":{"id":"R-91XNJBKM30F06"},"sourceAmount":"100.10",
            "memo":"Freelance payment"}
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).payment.create(body, batch_id)
 def update(recipient_id, recipient_account_id, body):
     """
     Update a recipient account
         A recipient_id, recipient_account_id, and body are required::
         RecipientAccount.update('R-fjeracjmuflh','A-2DQMpN4jurTFn9gRxobx4C',
         {"accountHolderName": "Acer Philips"})
     """
     config = Configuration(Configuration.public_key,
                            Configuration.private_key,
                            Configuration.enviroment)
     return Gateway(config).recipient_account.update(
         recipient_id, recipient_account_id, body)
예제 #21
0
 def setUp(self):
     self.client = Configuration.gateway("YOUR-API-KEY", "YOUR-API-SECRET",
                                         "YOUR-ENVIROMENT")