Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.6 KB

README.md

File metadata and controls

48 lines (36 loc) · 1.6 KB

Flexibee CircleCI Maven Central

It's unofficial Java library for Flexibee.eu. The library offers a set of Flexibee API objects for creating invoices via its REST API.

Usage

Maven

<dependency>
    <groupId>com.adleritech</groupId>
    <artifactId>flexibee</artifactId>
    <version>0.0.12</version>
</dependency>

Gradle

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.

Dev

Troubleshooting

Before package release you might have to run export GPG_TTY=$(tty).