return httpClient.doPostAndFollowLocation(uri, invoiceItem, queryParams, Invoice.class);
}
<<<<<<< HEAD
public InvoiceItem createExternalCharge(final InvoiceItem externalCharge, final DateTime requestedDate, final Boolean autoPay, final Boolean autoCommit, final String createdBy, final String reason, final String comment) throws KillBillClientException {
final List externalCharges = createExternalCharges(ImmutableList.of(externalCharge), requestedDate, autoPay, autoCommit, createdBy, reason, comment);
return externalCharges.isEmpty() ? null : externalCharges.get(0);
}
public List createExternalCharges(final Iterable externalCharges, final DateTime requestedDate, final Boolean autoPay, final Boolean autoCommit, final String createdBy, final String reason, final String comment) throws KillBillClientException {
=======
public InvoiceItem createExternalCharge(final InvoiceItem externalCharge, @Nullable final LocalDate requestedDate, final Boolean autoPay, final String createdBy, final String reason, final String comment) throws KillBillClientException {
final List externalCharges = createExternalCharges(ImmutableList.of(externalCharge), requestedDate, autoPay, createdBy, reason, comment);
return externalCharges.isEmpty() ? null : externalCharges.get(0);
}
public List createExternalCharges(final Iterable externalCharges, @Nullable final LocalDate requestedDate, final Boolean autoPay, final String createdBy, final String reason, final String comment) throws KillBillClientException {
>>>>>>> 53c06ac2d2df7c5e0175c8b7e923deb2b786dc2b
final Map> externalChargesPerAccount = new HashMap>();
for (final InvoiceItem externalCharge : externalCharges) {
Preconditions.checkNotNull(externalCharge.getAccountId(), "InvoiceItem#accountId cannot be null"); |