A java client for the Squarespace Commerce API
Squarespace squarespace = new Squarespace(/** your key */);
squarespace.order("123")
GetOrdersRequest request = new GetOrdersRequest.Builder()
.status(FulfillmentStatus.PENDING, FulfillmentStatus.CANCLED)
.before(earlierDate)
.after(laterDate)
.build();
squarespace.orders(request);
FulfillOrderRequest request = new FulfillOrderRequest.Builder()
.withOrderId("123")
.withShipment(shipmentInfo)
.shouldSendNotification(false) // true by default
.build();
squarespace.fulfillOrder(request);
squarespace.inventory();
UpdateInventoryRequest req = new UpdateInventoryRequest.Builder()
.increment("variant-1", 10) // increase variant-1 by 10 units
.deincrement("variant-2", 11) // decrease variant-2 by 10 units
.set("variant-3", 20) // set variant-3 to absolutely 20 units
.unlimited("variant-4") // variant-4 has unlimited units
.build();
squarespace.updateInventory(req);
GetTransactionsRequest req = new GetTransactionsRequest.Builder()
.before(earlierDate)
.after(laterDate)
.build();
squarespace.transactions(req);
Use maven – one of life's necessary evils – to fetch the latest version of this library.
<repository>
<id>bintray-i386-maven</id>
<name>bintray</name>
<url>https://dl.bintray.com/i386/maven</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<dependency>
<groupId>com.wildspirit.squarespace</groupId>
<artifactId>squarespace-java-api</artifactId>
<version>0.2</version>
</dependency>
MIT License