invoiced-java

Official Java client library for the Invoiced API

License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.invoiced
ArtifactId

ArtifactId

invoiced-java
Last Version

Last Version

4.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

invoiced-java
Official Java client library for the Invoiced API
Project URL

Project URL

https://github.com/Invoiced/invoiced-java
Source Code Management

Source Code Management

https://github.com/Invoiced/invoiced-java

Download invoiced-java

How to add to project

<!-- https://jarcasting.com/artifacts/com.invoiced/invoiced-java/ -->
<dependency>
    <groupId>com.invoiced</groupId>
    <artifactId>invoiced-java</artifactId>
    <version>4.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.invoiced/invoiced-java/
implementation 'com.invoiced:invoiced-java:4.0.0'
// https://jarcasting.com/artifacts/com.invoiced/invoiced-java/
implementation ("com.invoiced:invoiced-java:4.0.0")
'com.invoiced:invoiced-java:jar:4.0.0'
<dependency org="com.invoiced" name="invoiced-java" rev="4.0.0">
  <artifact name="invoiced-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.invoiced', module='invoiced-java', version='4.0.0')
)
libraryDependencies += "com.invoiced" % "invoiced-java" % "4.0.0"
[com.invoiced/invoiced-java "4.0.0"]

Dependencies

compile (10)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.21
com.fasterxml.jackson.core : jackson-core jar 2.9.9
com.fasterxml.jackson.core : jackson-databind jar 2.9.9
com.fasterxml.jackson.core : jackson-annotations jar 2.9.9
org.json : json jar 20160212
org.apache.httpcomponents : httpasyncclient jar 4.1.1
org.apache.httpcomponents : httpclient jar 4.5.2
org.apache.httpcomponents : httpmime jar 4.5.2
com.mashape.unirest : unirest-java jar 1.4.9
com.auth0 : java-jwt jar 3.3.0

test (2)

Group / Artifact Type Version
com.github.tomakehurst : wiremock jar 2.1.12
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

invoiced-java

This repository contains the Java client library for the Invoiced API.

You can find detailed API documentation along with java code snippets here.

Build Status Coverage Status Maven Central

Installing

You can build the jar file by doing

gradle jar

or build the complete all in one jar file by doing

gradle fatJar

Requirements

  • Gradle 5.6.4
  • Java 8+

Usage

First, you must instantiate a new client

import com.invoiced.entity.Connection;

Connection invoiced = new Connection("{YOUR_API_KEY}",false);

Then, API calls can be made like this:

# retrieve invoice
Invoice invoice = invoiced.newInvoice().retrieve({INVOICE_ID});

# mark as paid
Payment payment = invoiced.newPayment();
payment.amount = invoice.balance;
payment.method = "check";
paymentItem = new PaymentItem();
paymentItem.type = "invoice";
paymentItem.invoice = invoice.id;
paymentItem.amount = invoice.balance;
payment.appliedTo = PaymentItem{paymentItem};
payment.create();

If you want to use the sandbox API instead then you must set the second argument on the client to true like this:

import com.invoiced.entity.Connection;

Connection invoiced = new Connection("{YOUR_API_KEY}",true);

Developing

The test suite can be ran with gradle test

Deployment

Here is a useful guide for deploying to Maven.

com.invoiced

Invoiced

Helping your business get paid

Versions

Version
4.0.0
3.2.0