@@ -27,7 +27,6 @@ and standard method from web, mobile and desktop applications.
2727## Table of Contents
2828<!-- $toc-max-depth=2 -->
2929* [ formance-sdk-java] ( #formance-sdk-java )
30- * [ 🏗 ** Welcome to your new SDK!** 🏗] ( #welcome-to-your-new-sdk )
3130* [ Introduction] ( #introduction )
3231* [ Authentication] ( #authentication )
3332 * [ SDK Installation] ( #sdk-installation )
@@ -54,15 +53,15 @@ The samples below show how a published SDK artifact is used:
5453
5554Gradle:
5655``` groovy
57- implementation 'com.formance:formance-sdk:7.2.3 '
56+ implementation 'com.formance:formance-sdk:7.3.0 '
5857```
5958
6059Maven:
6160``` xml
6261<dependency >
6362 <groupId >com.formance</groupId >
6463 <artifactId >formance-sdk</artifactId >
65- <version >7.2.3 </version >
64+ <version >7.3.0 </version >
6665</dependency >
6766```
6867
@@ -141,6 +140,8 @@ public class Application {
141140
142141### [ ledger()] ( docs/sdks/ledger/README.md )
143142
143+ * [ getInfo] ( docs/sdks/ledger/README.md#getinfo ) - Show server information
144+ * [ getMetrics] ( docs/sdks/ledger/README.md#getmetrics ) - Read in memory metrics
144145
145146#### [ ledger().v1()] ( docs/sdks/ledgerv1/README.md )
146147
@@ -172,27 +173,36 @@ public class Application {
172173* [ countAccounts] ( docs/sdks/ledgerv2/README.md#countaccounts ) - Count the accounts from a ledger
173174* [ countTransactions] ( docs/sdks/ledgerv2/README.md#counttransactions ) - Count the transactions from a ledger
174175* [ createBulk] ( docs/sdks/ledgerv2/README.md#createbulk ) - Bulk request
176+ * [ createExporter] ( docs/sdks/ledgerv2/README.md#createexporter ) - Create exporter
175177* [ createLedger] ( docs/sdks/ledgerv2/README.md#createledger ) - Create a ledger
178+ * [ createPipeline] ( docs/sdks/ledgerv2/README.md#createpipeline ) - Create pipeline
176179* [ createTransaction] ( docs/sdks/ledgerv2/README.md#createtransaction ) - Create a new transaction to a ledger
177180* [ deleteAccountMetadata] ( docs/sdks/ledgerv2/README.md#deleteaccountmetadata ) - Delete metadata by key
181+ * [ deleteExporter] ( docs/sdks/ledgerv2/README.md#deleteexporter ) - Delete exporter
178182* [ deleteLedgerMetadata] ( docs/sdks/ledgerv2/README.md#deleteledgermetadata ) - Delete ledger metadata by key
183+ * [ deletePipeline] ( docs/sdks/ledgerv2/README.md#deletepipeline ) - Delete pipeline
179184* [ deleteTransactionMetadata] ( docs/sdks/ledgerv2/README.md#deletetransactionmetadata ) - Delete metadata by key
180185* [ exportLogs] ( docs/sdks/ledgerv2/README.md#exportlogs ) - Export logs
181186* [ getAccount] ( docs/sdks/ledgerv2/README.md#getaccount ) - Get account by its address
182187* [ getBalancesAggregated] ( docs/sdks/ledgerv2/README.md#getbalancesaggregated ) - Get the aggregated balances from selected accounts
183- * [ getInfo ] ( docs/sdks/ledgerv2/README.md#getinfo ) - Show server information
188+ * [ getExporterState ] ( docs/sdks/ledgerv2/README.md#getexporterstate ) - Get exporter state
184189* [ getLedger] ( docs/sdks/ledgerv2/README.md#getledger ) - Get a ledger
185190* [ getLedgerInfo] ( docs/sdks/ledgerv2/README.md#getledgerinfo ) - Get information about a ledger
186- * [ getMetrics ] ( docs/sdks/ledgerv2/README.md#getmetrics ) - Read in memory metrics
191+ * [ getPipelineState ] ( docs/sdks/ledgerv2/README.md#getpipelinestate ) - Get pipeline state
187192* [ getTransaction] ( docs/sdks/ledgerv2/README.md#gettransaction ) - Get transaction from a ledger by its ID
188193* [ getVolumesWithBalances] ( docs/sdks/ledgerv2/README.md#getvolumeswithbalances ) - Get list of volumes with balances for (account/asset)
189194* [ importLogs] ( docs/sdks/ledgerv2/README.md#importlogs )
190195* [ listAccounts] ( docs/sdks/ledgerv2/README.md#listaccounts ) - List accounts from a ledger
196+ * [ listExporters] ( docs/sdks/ledgerv2/README.md#listexporters ) - List exporters
191197* [ listLedgers] ( docs/sdks/ledgerv2/README.md#listledgers ) - List ledgers
192198* [ listLogs] ( docs/sdks/ledgerv2/README.md#listlogs ) - List the logs from a ledger
199+ * [ listPipelines] ( docs/sdks/ledgerv2/README.md#listpipelines ) - List pipelines
193200* [ listTransactions] ( docs/sdks/ledgerv2/README.md#listtransactions ) - List transactions from a ledger
194201* [ readStats] ( docs/sdks/ledgerv2/README.md#readstats ) - Get statistics from a ledger
202+ * [ resetPipeline] ( docs/sdks/ledgerv2/README.md#resetpipeline ) - Reset pipeline
195203* [ revertTransaction] ( docs/sdks/ledgerv2/README.md#reverttransaction ) - Revert a ledger transaction by its ID
204+ * [ startPipeline] ( docs/sdks/ledgerv2/README.md#startpipeline ) - Start pipeline
205+ * [ stopPipeline] ( docs/sdks/ledgerv2/README.md#stoppipeline ) - Stop pipeline
196206* [ updateLedgerMetadata] ( docs/sdks/ledgerv2/README.md#updateledgermetadata ) - Update ledger metadata
197207
198208### [ orchestration()] ( docs/sdks/orchestration/README.md )
@@ -421,10 +431,10 @@ You can override the default server globally using the `.serverIndex(int serverI
421431
422432If the selected server has variables, you may override its default values using the associated builder method(s):
423433
424- | Variable | BuilderMethod | Supported Values | Default | Description |
425- | -------------- | -------------------------------------------- | -------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------- |
426- | ` environment ` | ` environment(ServerEnvironment environment) ` | - ` "eu. sandbox" ` <br />- ` "sandbox" ` < br />- ` " eu-west-1"` <br />- ` "us-east-1" ` | ` "eu. sandbox" ` | The environment name. Defaults to the production environment. |
427- | ` organization ` | ` organization(String organization) ` | java.lang.String | ` "orgID-stackID" ` | The organization name. Defaults to a generic organization. |
434+ | Variable | BuilderMethod | Supported Values | Default | Description |
435+ | -------------- | -------------------------------------------- | ----------------------------------------------------- | ----------------- | ------------------------------------------------------------- |
436+ | ` environment ` | ` environment(ServerEnvironment environment) ` | - ` "sandbox" ` <br />- ` "eu-west-1" ` <br />- ` "us-east-1" ` | ` "sandbox" ` | The environment name. Defaults to the production environment. |
437+ | ` organization ` | ` organization(String organization) ` | java.lang.String | ` "orgID-stackID" ` | The organization name. Defaults to a generic organization. |
428438
429439#### Example
430440
@@ -477,7 +487,7 @@ public class Application {
477487 public static void main (String [] args ) throws Exception {
478488
479489 SDK sdk = SDK . builder()
480- .serverURL(" https://orgID-stackID.eu. sandbox.formance.cloud" )
490+ .serverURL(" https://orgID-stackID.sandbox.formance.cloud" )
481491 .security(Security . builder()
482492 .clientID(System . getenv(). getOrDefault(" CLIENT_ID" , " " ))
483493 .clientSecret(System . getenv(). getOrDefault(" CLIENT_SECRET" , " " ))
@@ -500,7 +510,7 @@ public class Application {
500510
501511Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
502512
503- By default, an API error will throw a ` models/errors/SDKError ` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective * Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the ` addMetadataOnTransaction ` method throws the following exceptions:
513+ By default, an API error will throw a ` models/errors/SDKError ` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective * Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the ` getInfo ` method throws the following exceptions:
504514
505515| Error Type | Status Code | Content Type |
506516| ----------------------------- | ----------- | ---------------- |
@@ -514,12 +524,9 @@ package hello.world;
514524
515525import com.formance.formance_sdk.SDK ;
516526import com.formance.formance_sdk.models.errors.V2ErrorResponse ;
517- import com.formance.formance_sdk.models.operations.V2AddMetadataOnTransactionRequest ;
518- import com.formance.formance_sdk.models.operations.V2AddMetadataOnTransactionResponse ;
527+ import com.formance.formance_sdk.models.operations.V2GetInfoResponse ;
519528import com.formance.formance_sdk.models.shared.Security ;
520529import java.lang.Exception ;
521- import java.math.BigInteger ;
522- import java.util.Map ;
523530
524531public class Application {
525532
@@ -532,19 +539,12 @@ public class Application {
532539 .build())
533540 .build();
534541
535- V2AddMetadataOnTransactionRequest req = V2AddMetadataOnTransactionRequest . builder()
536- .requestBody(Map . ofEntries(
537- Map . entry(" admin" , " true" )))
538- .id(new BigInteger (" 1234" ))
539- .ledger(" ledger001" )
540- .dryRun(true )
541- .build();
542-
543- V2AddMetadataOnTransactionResponse res = sdk. ledger(). v2(). addMetadataOnTransaction()
544- .request(req)
542+ V2GetInfoResponse res = sdk. ledger(). getInfo()
545543 .call();
546544
547- // handle response
545+ if (res. v2ConfigInfoResponse(). isPresent()) {
546+ // handle response
547+ }
548548 }
549549}
550550```
0 commit comments