The Merge Java SDK provides convenient access to the Merge API from Java or Kotlin.
API documentation is available at here.
Add the dependency in your build.gradle
:
dependencies {
implementation 'com.flagright.api:flagright-java:0.x.x'
}
Add the dependency in your pom.xml
:
<dependency>
<groupId>com.flagright.api</groupId>
<artifactId>flagright-java</artifactId>
<version>x.x.x</version>
</dependency
import com.flagright.api.FlagrightApiClient;
import com.flagright.api.types.TransactionType;
import com.flagright.api.types.Transaction;
import com.flagright.api.types.TransactionsVerifyResponse;
import com.flagright.api.resources.transactions.requests.TransactionsVerifyRequest;
FlagrightApiClient flagright = FlagrightApiClient.builder()
.environment("https://sandbox.flagright.com")
.apiKey("YOUR_API_KEY")
.build();
TransactionsVerifyResponse resposne = flagright.transactions.verify(TransactionsVerifyRequest.builder()
.body(Transaction.builder()
.transactionId("my-transaction-id")
.type(TransactionType.DEPOSIT)
.timestamp(1692624734000.0)
.build()
.build());
While we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!
On the other hand, contributions to the README are always very welcome!