public virtual RecurringCharge UpdateRecurringCharge(string id, RecurringChargeOptions options) { var url = string.Format("{0}/{1}", Urls.RecurringCharges, id); var response = Requestor.PutJson(url, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(Mapper <RecurringCharge> .MapFromJson(response)); }
public virtual AchAccount UpdateAchAccount(string achAccountId, AchAccountOptions o) { var url = string.Format("{0}/{1}", Urls.AchAccounts, achAccountId); var response = Requestor.PutJson(url, ParameterBuilder.BuildJsonPostParameters(o), SecretKey); return(Mapper <AchAccount> .MapFromJson(response)); }
public virtual Transaction Sign(string transactionId, SignatureOptions options) { var url = string.Format("{0}/{1}/sign", Urls.Transactions, transactionId); var response = Requestor.PostJson(url, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(TransactionMapper.MapFromJson(response)); }
public virtual Models.Merchant UpdateMerchant(MerchantOptions m) { var merchant = ParameterBuilder.BuildJsonPostParameters(m); var response = Requestor.PutJson(Urls.Merchant, merchant, SecretKey); return(Mapper <Models.Merchant> .MapFromJson(response)); }
public virtual RecurringCharge RecurringCharge(RecurringChargeOptions options) { var response = Requestor.PostJson( Urls.RecurringCharges, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(Mapper <RecurringCharge> .MapFromJson(response)); }
public virtual Credit Credit(CreditOptions options) { var response = Requestor.PostJson( Urls.Credits, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(Mapper <Credit> .MapFromJson(response)); }
public virtual Refund Refund(string chargeId, RefundOptions options) { var url = string.Format("{0}/{1}/refund", Urls.Charges, chargeId); var response = Requestor.PostJson(url, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(Mapper <Refund> .MapFromJson(response)); }
public virtual Charge Capture(string chargeId, CaptureOptions options) { var url = string.Format("{0}/{1}/capture", Urls.Charges, chargeId); var response = Requestor.PostJson(url, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(Mapper <Charge> .MapFromJson(response)); }
public virtual Bank CreateBank(object options) { var response = Requestor.PostJson( Urls.Banks, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(Mapper <Bank> .MapFromJson(response)); }
public virtual Card CreateCard(object options) { var response = Requestor.PostJson( Urls.Cards, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(Mapper <Card> .MapFromJson(response)); }
public virtual Charge Authorize(ChargeOptions options) { options.AutoCapture = false; var response = Requestor.PostJson( Urls.Charges, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(Mapper <Charge> .MapFromJson(response)); }
public virtual Transaction Void(string transactionId, string reference = null) { var url = string.Format("{0}/{1}/void", Urls.Transactions, transactionId); var reqparams = new Dictionary <string, string> { { "reference", reference } }; var response = Requestor.PostJson(url, ParameterBuilder.BuildJsonPostParameters(reqparams), SecretKey); return(TransactionMapper.MapFromJson(response)); }
public virtual Charge Capture(string chargeId, int amountInCents, string reference = null) { var url = string.Format("{0}/{1}/capture", Urls.Charges, chargeId); var response = Requestor.PostJson(url, ParameterBuilder.BuildJsonPostParameters(new CaptureOptions() { AmountInCents = amountInCents, Reference = reference }), SecretKey); return(Mapper <Charge> .MapFromJson(response)); }
public virtual Refund Refund(string chargeId, int?refundAmountInCents, string reference = null, object data = null) { var url = string.Format("{0}/{1}/refund", Urls.Charges, chargeId); var options = new RefundOptions { AmountInCents = refundAmountInCents, Reference = reference, Data = data }; var response = Requestor.PostJson(url, ParameterBuilder.BuildJsonPostParameters(options), SecretKey); return(Mapper <Refund> .MapFromJson(response)); }