Skip to content

Commit

Permalink
Merge pull request #306 from nandorholozsnyak/patch-1
Browse files Browse the repository at this point in the history
docs: Example in the readme.md is fixed
  • Loading branch information
Justintime50 authored Mar 21, 2024
2 parents 6136622 + 2651394 commit 74cb1d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import java.util.List;
import java.util.Map;

public class CreateShipment {
public static void main(String[] args) {
public static void main(String[] args) throws EasyPostException {
EasyPostClient client = new EasyPostClient(System.getenv("EASYPOST_API_KEY"));

Map<String, Object> fromAddressMap = new HashMap<String, Object>();
Expand Down Expand Up @@ -82,7 +82,7 @@ public class CreateShipment {

Shipment shipment = client.shipment.create(shipmentMap);

Shipment boughtShipment = client.shipment.buy(shipment.lowestRate(), shipment.getId());
Shipment boughtShipment = client.shipment.buy(shipment.getId(), shipment.lowestRate());

System.out.println(boughtShipment.prettyPrint());
}
Expand Down

0 comments on commit 74cb1d7

Please sign in to comment.