It's unofficial Java library for Flexibee.eu. The library offers a set of Flexibee API objects for creating invoices via its REST API.
<dependency>
<groupId>com.adleritech</groupId>
<artifactId>flexibee</artifactId>
<version>0.0.12</version>
</dependency>
compile "com.adleritech:flexibee:0.0.12"
To create an invoice and send it to Flexibee, you can use the following code snippet:
WinstromRequest request = WinstromRequest.builder()
.issuedInvoice(IssuedInvoice.builder()
.company("code:ABCFIRM1#")
.documentType("code:FAKTURA")
.items(Arrays.asList(
IssuedInvoiceItem.builder()
.name("Invoice line")
.amount(1)
.unitPrice(128_140.96)
.vatRate(21d).build()
))
.build()).build();
FlexibeeClient flexibeeClient = new FlexibeeClient("winstrom", "winstrom", "demo");
WinstromResponse response = flexibeeClient.createInvoice(request);
For more examples please check tests.
Before package release you might have to run export GPG_TTY=$(tty)
.