Package org.openinvoice.ubl4j.core.common

Examples of org.openinvoice.ubl4j.core.common.OrderTypeToInvoiceTypeTransformer.create()


    private void createInvoiceFromOrder() throws IOException, UBL4JException {
        InvoiceCreationOutput output = (InvoiceCreationOutput) getOutput();
        OrderTypeToInvoiceTypeTransformer orderTypeToInvoiceTypeTransformer =
                new OrderTypeToInvoiceTypeTransformer();
        CreateInvoiceBasedOnOrderInput input = (CreateInvoiceBasedOnOrderInput) getInput();
        InvoiceType generatedInvoiceType = orderTypeToInvoiceTypeTransformer.create(input.getOrderInputStream());
        output.setGeneratedInvoiceType(generatedInvoiceType);
        InvoiceTypeMarshaller.marshal(generatedInvoiceType, output.getInvoiceOutputStream(generatedInvoiceType));
        output.setInvoiceOutputURI(output.getInvoiceOutputURI());
    }
View Full Code Here


    }

    public void testCreate() throws Exception {
        OrderTypeToInvoiceTypeTransformer
                orderTypeToInvoiceTypeTransformer = new OrderTypeToInvoiceTypeTransformer();
        assertTrue(null != orderTypeToInvoiceTypeTransformer.create(orderInputStream));
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.