Official Java client library for the Invoiced API
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
src
.gitignore
.travis.yml
LICENSE
README.md
build.gradle
gradlew First commit of invoiced-java Oct 19, 2016
gradlew.bat
settings.gradle

README.md

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

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 3.0
  • Java 7+

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
Transaction transaction = invoiced.newTransaction();
transaction.invoice = invoice.id;
transaction.amount = invoice.balance;
transaction.method = "check";
transaction.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