public final class UblInvoiceUtils extends Object
Constructor and Description |
---|
UblInvoiceUtils() |
Modifier and Type | Method and Description |
---|---|
static InvoiceDTO |
convertToEHFV3Invoice(Invoice invoice)
Method used to convert EHF invoice to Invoice wrapper.
|
static byte[] |
generateEHFV3InvoiceXML(InvoiceDTO invoiceDTO)
Marshalling invoice object to byte array.
|
static void |
generateEHFV3InvoiceXML(InvoiceDTO invoiceDTO,
String filePath) |
static InvoiceDTO |
getEHFV3Invoice(File file)
Unmarshalling XML file to invoice object.
|
static InvoiceDTO |
getEHFV3Invoice(InputStream is) |
static InvoiceDTO |
getEHFV3Invoice(String filePath)
Method used to convert EHF Invoice XML file to EHF Invoice object
|
static String |
getInvoiceVersion(InputStream is)
Gets the invoice version.
|
static JAXBContext |
getJAXBContext() |
static boolean |
isValidInvoiceAmount(InvoiceDTO invoiceDTO) |
public static JAXBContext getJAXBContext() throws Exception
Exception
public static String getInvoiceVersion(InputStream is) throws JAXBException
is
- the isJAXBException
- the jAXB exceptionpublic static boolean isValidInvoiceAmount(InvoiceDTO invoiceDTO)
public static void generateEHFV3InvoiceXML(InvoiceDTO invoiceDTO, String filePath) throws JAXBException
JAXBException
public static byte[] generateEHFV3InvoiceXML(InvoiceDTO invoiceDTO) throws JAXBException
JAXBException
public static InvoiceDTO getEHFV3Invoice(InputStream is) throws Exception
Exception
public static InvoiceDTO getEHFV3Invoice(File file) throws JAXBException
JAXBException
public static InvoiceDTO getEHFV3Invoice(String filePath) throws JAXBException
JAXBException
public static InvoiceDTO convertToEHFV3Invoice(Invoice invoice)
Copyright © 2021 Norwegian Agency for Public Management and eGovernment (Difi). All rights reserved.