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)
Example #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)
 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)
 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)
 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)
 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)
 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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
 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)
 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)
Example #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)
 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)
Example #21
0
 def gateway(public_key, private_key, enviroment):
     return Gateway(Configuration(public_key, private_key, enviroment))