/** * Refund an invoice given some line items * <p/> * Returns the refunded invoice * * @deprecated Please use refundInvoice(String, InvoiceRefund) * * @param invoiceId The id of the invoice to refund * @param lineItems The list of adjustment refund objects * @param method If credit line items exist on the invoice, this parameter specifies which refund method to use first * @return the refunded invoice */ @Deprecated public Invoice refundInvoice(final String invoiceId, List<AdjustmentRefund> lineItems, final RefundMethod method) { final InvoiceRefund invoiceRefund = new InvoiceRefund(); invoiceRefund.setRefundMethod(method); invoiceRefund.setLineItems(lineItems); return refundInvoice(invoiceId, invoiceRefund); }
/** * Refund an invoice given an open amount * <p/> * Returns the refunded invoice * * @deprecated Please use refundInvoice(String, InvoiceRefund) * * @param invoiceId The id of the invoice to refund * @param amountInCents The open amount to refund * @param method If credit line items exist on the invoice, this parameter specifies which refund method to use first * @return the refunded invoice */ @Deprecated public Invoice refundInvoice(final String invoiceId, final Integer amountInCents, final RefundMethod method) { final InvoiceRefund invoiceRefund = new InvoiceRefund(); invoiceRefund.setRefundMethod(method); invoiceRefund.setAmountInCents(amountInCents); return refundInvoice(invoiceId, invoiceRefund); }
refundOptions.setRefundMethod(RefundMethod.transaction_first); refundOptions.setLineItems(lineItems); final Invoice refundInvoice = recurlyClient.refundInvoice(invoice.getId(), refundOptions);
refundOptions.setRefundMethod(RefundMethod.transaction_first); refundOptions.setLineItems(lineItems); final Invoice refundInvoice = recurlyClient.refundInvoice(invoice.getId(), refundOptions);
refundOptions.setExternalRefund(true); refundOptions.setPaymentMethod("credit_card"); final Invoice refundInvoice = recurlyClient.refundInvoice(invoice.getId(), refundOptions);
refundOptions.setExternalRefund(true); refundOptions.setPaymentMethod("credit_card"); final Invoice refundInvoice = recurlyClient.refundInvoice(invoice.getId(), refundOptions);