Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sync): Add sync transaction support #57

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", null);
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
Loading