Skip to content

Commit

Permalink
feat(sync): Add sync transaction support
Browse files Browse the repository at this point in the history
  • Loading branch information
cbetta committed Sep 11, 2024
1 parent 25f775e commit ad2a8dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>gr4vy</artifactId>
<packaging>jar</packaging>
<name>gr4vy</name>
<version>0.30.0</version>
<version>0.31.0</version>
<url>https://gr4vy.com</url>
<description>Gr4vy Java SDK</description>

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/gr4vy/sdk/Gr4vyClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ public Transaction getTransaction(String transactionId) {
String response = this.get("/transactions/" + transactionId);
return this.gson.fromJson(response,Transaction.class);
}
public Transaction syncTransaction(String transactionId) {
String response = this.post("/transactions/" + transactionId + "/sync");
return this.gson.fromJson(response,Transaction.class);
}
public Transaction captureTransaction(String transactionId, TransactionCaptureRequest request) {
String response = this.post("/transactions/" + transactionId + "/capture", this.gson.toJson(request));
return this.gson.fromJson(response,Transaction.class);
Expand Down

0 comments on commit ad2a8dd

Please sign in to comment.