/// <summary>
 /// Creates a batch based on the body or
 /// Genereates a quote based on batch_id or
 /// Starts processing the batch based on the batch_id
 /// or this does way too many things for a single method
 /// </summary>
 /// <param name="body">A batch object</param>
 /// <returns>The newly created batch object</returns>
 public static Batch create(Batch body)
 {
     return(PaymentRails_Configuration.gateway().batch.create(body));
 }
 /// <summary>
 /// Updates a batch based on batch id and the body
 /// </summary>
 /// <param name="body">A batch object that will be updated</param>
 /// <returns>The response</returns>
 public static bool update(Batch batch)
 {
     return(PaymentRails_Configuration.gateway().batch.update(batch));
 }
 /// <summary>
 /// Retrieves a list of the recipient accounts for a given recipient
 /// </summary>
 /// <param name="recipient_id"></param>
 /// <returns></returns>
 public static List <RecipientAccount> findAll(string recipient_id)
 {
     return(PaymentRails_Configuration.gateway().recipientAccount.findAll(recipient_id));
 }
 /// <summary>
 /// Retrieves the batch based on the batch_id
 /// </summary>
 /// <param name="batch_id">A batch id belonging the a batch object </param>
 /// <returns>A batch object that the batch id belongs to</returns>
 public static Batch find(string batch_id)
 {
     return(PaymentRails_Configuration.gateway().batch.find(batch_id));
 }
 /// <summary>
 /// Creates a payment based on the body and batch id
 /// </summary>
 /// <param name="payment">A payment object that will be created</param>
 /// <returns>A newley created payment object</returns>
 public static Payment create(Payment payment)
 {
     return(PaymentRails_Configuration.gateway().payment.create(payment));
 }
 /// <summary>
 /// Deletes a payment based on the payment id and batch id
 /// </summary>
 /// <param name="paymentId">A payment id that belongs to a payment object</param>
 /// <param name="batchId">A batch id that belongs to a payment object</param>
 /// <returns>The response</returns>
 public static bool delete(string paymentId, string batchId)
 {
     return(PaymentRails_Configuration.gateway().payment.delete(paymentId, batchId));
 }
 /// <summary>
 /// Creates a recipient based on the body given to the client
 /// </summary>
 /// <param name="recipient">A recipient object that will be created</param>
 /// <returns>A newly created recipient object</returns>
 public static Recipient create(Recipient recipient)
 {
     return(PaymentRails_Configuration.gateway().recipient.create(recipient));
 }
 /// <summary>
 /// Generates a quote based on batch id
 /// </summary>
 /// <param name="batch_id">A batch id belonging to a batch oject</param>
 /// <returns>The response</returns>
 public static Batch generateQuote(string batch_id)
 {
     return(PaymentRails_Configuration.gateway().batch.generateQuote(batch_id));
 }
예제 #9
0
 /// <summary>
 /// Retrieves all balances from the Payment Rails API for the specified type,
 /// if no type is selected it will return the paymentrails type balances
 /// </summary>
 /// <param name="type">The type of account to fetch the balance from. Can be "paymentrails", "paypal"</param>
 /// <returns>A balance dictionary containing a balance for each of your currencies (USD, CAD, ...)</returns>
 public static Dictionary <String, Types.Balance> get(string type = "")
 {
     return(PaymentRails_Configuration.gateway().balances.find(type));
 }
 /// <summary>
 /// Retrieves either the logs or payments of a recipient object
 /// </summary>
 /// <param name="recipient_id">The recipient id that belongs to a recipient bject </param>
 /// <param name="term">An optional term that can be logs or payments. Using a term will result
 /// in a the logs or payments being returned </param>
 /// <returns>The response</returns>
 public static Recipient find(string recipient_id)
 {
     return(PaymentRails_Configuration.gateway().recipient.find(recipient_id));
 }
예제 #11
0
 public PaymentRails_Recipient_Gateway(PaymentRails_Gateway gateway)
 {
     this.gateway = gateway;
     this.config  = gateway.config;
 }
 public PaymentRails_Balances_Gateway(PaymentRails_Gateway gateway)
 {
     this.gateway = gateway;
     this.config  = gateway.config;
 }
 /// <summary>
 /// Updates a recipient account for the given recipient
 /// </summary>
 /// <param name="recipient_id"></param>
 /// <param name="recipientAccount"></param>
 /// <returns></returns>
 public static RecipientAccount update(string recipient_id, RecipientAccount recipientAccount)
 {
     return(PaymentRails_Configuration.gateway().recipientAccount.update(recipient_id, recipientAccount));
 }
 /// <summary>
 /// Deletes a batch based on the batch id
 /// </summary>
 /// <param name="batch_id">A batch id beloning to a batch object</param>
 /// <returns>The response</returns>
 public static bool delete(string batch_id)
 {
     return(PaymentRails_Configuration.gateway().batch.delete(batch_id));
 }
 /// <summary>
 /// Updates a recipient based on the recipient id given and the body
 /// given to the client
 /// </summary>
 ///<param name="recipient">A recipient object that will be updated</param>
 /// <returns>The response</returns>
 public static bool update(Recipient recipient)
 {
     return(PaymentRails_Configuration.gateway().recipient.update(recipient));
 }
 /// <summary>
 /// Lists all batches based on queries
 /// </summary>
 /// <param name="term">Wildcard search of the batch-id</param>
 /// <param name="page">The page number (default: 1)</param>
 /// <param name="pageSize">Number of records in a page (default: 10)</param>
 /// <returns>A list of batches</returns>
 public static List <Batch> search(string term = "", int page = 1, int pageSize = 10)
 {
     return(PaymentRails_Configuration.gateway().batch.search(term, page, pageSize));
 }
 /// <summary>
 /// Deletes a recipient based on the recipient id given
 /// </summary>
 /// <param name="recipient_id">A recipient id belonging to a recipient object</param>
 /// <returns>The response</returns>
 public static bool delete(string recipient_id)
 {
     return(PaymentRails_Configuration.gateway().recipient.delete(recipient_id));
 }
 /// <summary>
 /// Retrieves the Payment based on the payment id and batch id
 /// </summary>
 /// <param name="payment_id">A payment id belonging to a payment object</param>
 /// <returns>The response</returns>
 public static Payment find(string payment_id)
 {
     return(PaymentRails_Configuration.gateway().payment.find(payment_id));
 }
 /// <summary>
 /// Starts Processing a batch based on the batch id
 /// </summary>
 /// <param name="batch_id">A batch id belonging to a batch object</param>
 /// <returns>The response</returns>
 public static Batch processBatch(string batch_id)
 {
     return(PaymentRails_Configuration.gateway().batch.processBatch(batch_id));
 }
 /// <summary>
 /// Updates a payment based on the payment id and batch id and body
 /// </summary>
 /// <param name="payment">A payment object that will be updated</param>
 /// <returns>The response</returns>
 public static bool update(Payment payment)
 {
     return(PaymentRails_Configuration.gateway().payment.update(payment));
 }
 /// <summary>
 /// Retrieves a summary based on the batch id
 /// </summary>
 /// <param name="batch_id">A batch id belonging to a batch object</param>
 /// <returns>The response</returns>
 public static string summary(string batch_id)
 {
     return(PaymentRails_Configuration.gateway().batch.summary(batch_id));
 }
 /// <summary>
 /// Lists all the payments based on and batch id
 /// </summary>
 /// <param name="term">The search term</param>
 /// <param name="page">The page number (default: 1)</param>
 /// <param name="pageSize">Number of records in a page (default: 10)</param>
 /// <param name="batchId">A batch id that will have its payments returned</param>
 /// <returns>A list of payments</returns>
 public static List <Payment> search(string term = "", int page = 1, int pageSize = 10, string batchId = "")
 {
     return(PaymentRails_Configuration.gateway().payment.search(term, page, pageSize, batchId));
 }
예제 #23
0
 public PaymentRails_Client(PaymentRails_Configuration config)
 {
     this.config = config;
 }