// get the invoice lines from the invoice
final List<InvoiceLine> invoiceLines = invoice.getInvoiceLines();
if(invoiceLines == null || invoiceLines.size() == 0) {
// missing invoice lines
throw new SwsNoInvoiceLinesForInvoiceException(invoice);
}
if(invoiceLines.size() >= SwsClient.MAX_NO_OF_INVOICE_LINES) {
// too many invoice lines
throw new SwsTooManyInvoiceLinesException(invoice);