public Invoice RefundAmount(int amountInCents, RefundMethod method = RefundMethod.CreditFirst) { var refundInvoice = new Invoice(); var refund = new OpenAmountRefund(amountInCents, method); var statusCode = Client.Instance.PerformRequest(Client.HttpRequestMethod.Post, memberUrl() + "/refund", refund.WriteXml, refundInvoice.ReadXml); if (HttpStatusCode.Created == statusCode || HttpStatusCode.OK == statusCode) { return(refundInvoice); } else { return(null); } }
public Invoice RefundAmount(int amountInCents, RefundOrderPriority refundPriority = RefundOrderPriority.Credit) { var refundInvoice = new Invoice(); var refund = new OpenAmountRefund(amountInCents, refundPriority); var response = Client.Instance.PerformRequest(Client.HttpRequestMethod.Post, memberUrl() + "/refund", refund.WriteXml, refundInvoice.ReadXml); if (HttpStatusCode.Created == response || HttpStatusCode.OK == response) { return(refundInvoice); } else { return(null); } }
public Invoice RefundAmount(int amountInCents) { var refundInvoice = new Invoice(); var refund = new OpenAmountRefund(amountInCents); var response = Client.Instance.PerformRequest(Client.HttpRequestMethod.Post, UrlPrefix + InvoiceNumber + "/refund", refund.WriteXml, refundInvoice.ReadXml); if (HttpStatusCode.Created == response || HttpStatusCode.OK == response) { return(refundInvoice); } else { return(null); } }
public Invoice RefundAmount(int amountInCents, RefundOrderPriority refundPriority = RefundOrderPriority.Credit) { var refundInvoice = new Invoice(); var refund = new OpenAmountRefund(amountInCents, refundPriority); var response = Client.Instance.PerformRequest(Client.HttpRequestMethod.Post, memberUrl() + "/refund", refund.WriteXml, refundInvoice.ReadXml); if (HttpStatusCode.Created == response || HttpStatusCode.OK == response) return refundInvoice; else return null; }