diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a048c034..15a0d3fc 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,14 +18,14 @@ jobs:
lint:
timeout-minutes: 15
name: lint
- runs-on: ${{ github.repository == 'stainless-sdks/clear-street-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Java
- uses: actions/setup-java@v5
+ uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
@@ -34,7 +34,7 @@ jobs:
cache: gradle
- name: Set up Gradle
- uses: gradle/actions/setup-gradle@v4
+ uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3
- name: Run lints
run: ./scripts/lint
@@ -45,14 +45,14 @@ jobs:
permissions:
contents: read
id-token: write
- runs-on: ${{ github.repository == 'stainless-sdks/clear-street-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Java
- uses: actions/setup-java@v5
+ uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
@@ -61,7 +61,7 @@ jobs:
cache: gradle
- name: Set up Gradle
- uses: gradle/actions/setup-gradle@v4
+ uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3
- name: Build SDK
run: ./scripts/build
@@ -71,7 +71,7 @@ jobs:
github.repository == 'stainless-sdks/clear-street-java' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
- uses: actions/github-script@v8
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());
@@ -88,13 +88,13 @@ jobs:
test:
timeout-minutes: 15
name: test
- runs-on: ${{ github.repository == 'stainless-sdks/clear-street-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Java
- uses: actions/setup-java@v5
+ uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
@@ -103,7 +103,7 @@ jobs:
cache: gradle
- name: Set up Gradle
- uses: gradle/gradle-build-action@v2
+ uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
- name: Run tests
run: ./scripts/test
diff --git a/.github/workflows/publish-sonatype.yml b/.github/workflows/publish-sonatype.yml
index bd4535dd..97a31bec 100644
--- a/.github/workflows/publish-sonatype.yml
+++ b/.github/workflows/publish-sonatype.yml
@@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Java
- uses: actions/setup-java@v5
+ uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
@@ -26,14 +26,14 @@ jobs:
cache: gradle
- name: Set up Gradle
- uses: gradle/gradle-build-action@v2
+ uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0
- name: Publish to Sonatype
run: |-
export -- GPG_SIGNING_KEY_ID
printenv -- GPG_SIGNING_KEY | gpg --batch --passphrase-fd 3 --import 3<<< "$GPG_SIGNING_PASSWORD"
GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')"
- ./gradlew publish --no-configuration-cache
+ ./gradlew publishAndReleaseToMavenCentral --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD" --no-configuration-cache
env:
SONATYPE_USERNAME: ${{ secrets.CLEAR_STREET_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.CLEAR_STREET_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index fe7e731e..0ec66cb6 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -12,7 +12,7 @@ jobs:
if: github.repository == 'clear-street/clear-street-java' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check release environment
run: |
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 10f30916..6b7b74c5 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.2.0"
+ ".": "0.3.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index d96dfeb4..539fdcf9 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 55
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/clear-street/clear-street-922781ed11f31a2f675819e9e6a1066ebb141304b9289c08d8cdbb825ff68b73.yml
-openapi_spec_hash: fac86508e0dd013ab6de64209da5ed72
-config_hash: f2e1d4767745a6f044519331a7cbfd79
+configured_endpoints: 61
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/clear-street/clear-street-bce7904275097b8181e3caa70f5f9975597f1cc32129e1451383127814b6f44a.yml
+openapi_spec_hash: cfaa2bccf49e65153ce793c955362a1f
+config_hash: 36605b82f17407e161a8bb539385e0fe
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7efc228f..d049cb3d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,78 @@
# Changelog
+## 0.3.0 (2026-07-21)
+
+Full Changelog: [v0.2.0...v0.3.0](https://github.com/clear-street/clear-street-java/compare/v0.2.0...v0.3.0)
+
+### Features
+
+* **api:** api update ([8e668a0](https://github.com/clear-street/clear-street-java/commit/8e668a0c202fed63e1b9c23342dc0fbca5a75f6b))
+* **api:** api update ([e49631b](https://github.com/clear-street/clear-street-java/commit/e49631bc1b6abeace65211a8199584d87432351a))
+* **api:** api update ([93ab5d0](https://github.com/clear-street/clear-street-java/commit/93ab5d00b8ab8c58834ff2ac68f9d981273553a0))
+* **api:** api update ([3de82bc](https://github.com/clear-street/clear-street-java/commit/3de82bcb52e79fd7e28d1b3f35268702af88b4db))
+* **api:** api update ([be576e9](https://github.com/clear-street/clear-street-java/commit/be576e98cbbd9258f28bcca028e8cf146832198b))
+* **api:** api update ([9ac90a8](https://github.com/clear-street/clear-street-java/commit/9ac90a87b21c01f225226196b2063107ad2881fc))
+* **api:** api update ([127837a](https://github.com/clear-street/clear-street-java/commit/127837aa8ae2a47a914ed45215641b314e2035af))
+* **api:** api update ([65e2b33](https://github.com/clear-street/clear-street-java/commit/65e2b33feb2f128acd41bfea3e581b36fe63e993))
+* **api:** api update ([f424174](https://github.com/clear-street/clear-street-java/commit/f424174cdf522be2baade2f18ffa21afe2734c3b))
+* **api:** api update ([7793504](https://github.com/clear-street/clear-street-java/commit/77935043d0da7b4e933c483cb46be44ec60848f0))
+* **api:** api update ([f26cd58](https://github.com/clear-street/clear-street-java/commit/f26cd58c36d0f1aca610872d06e896a7dddba4c9))
+* **api:** api update ([afdeeff](https://github.com/clear-street/clear-street-java/commit/afdeeff688fdb28c68ba092537e3326407ed1eb3))
+* **api:** api update ([3f9bc77](https://github.com/clear-street/clear-street-java/commit/3f9bc77d403bafc04216324026775a90e398dc88))
+* **api:** api update ([31b4287](https://github.com/clear-street/clear-street-java/commit/31b4287d0576498b5fec943e1f2fabdc3226c52f))
+* **api:** api update ([b2f56db](https://github.com/clear-street/clear-street-java/commit/b2f56db9e2b26410b51bfea83c7e662854c1b34a))
+* **api:** api update ([fd45737](https://github.com/clear-street/clear-street-java/commit/fd457373aca58d0835996e446fd5e9e02cc49403))
+* **api:** api update ([87f2503](https://github.com/clear-street/clear-street-java/commit/87f2503ef78f51a42229667ea5a3b71fe461de39))
+* **api:** api update ([692735b](https://github.com/clear-street/clear-street-java/commit/692735bf797743480bae0e8e8e8ffbd9a97d1919))
+* **api:** api update ([245f095](https://github.com/clear-street/clear-street-java/commit/245f095fbc541a0f12a75b75bf410f79ac0430e3))
+* **api:** api update ([ba66042](https://github.com/clear-street/clear-street-java/commit/ba66042f673d15e539d21dcec8ca59cd55f981e2))
+* **api:** api update ([0a6aff1](https://github.com/clear-street/clear-street-java/commit/0a6aff1439838a09031f758b2b39afaea2df7e47))
+* **api:** api update ([457c1d7](https://github.com/clear-street/clear-street-java/commit/457c1d74df20eca53640d45d68d02cf26be92ddd))
+* **api:** api update ([929c0f8](https://github.com/clear-street/clear-street-java/commit/929c0f84068d006f9b3ad816cc1e5590db6f8db9))
+* **api:** api update ([6356421](https://github.com/clear-street/clear-street-java/commit/63564214348bcbb950f6427d52cb11d1dc5736fc))
+* **api:** api update ([2f63393](https://github.com/clear-street/clear-street-java/commit/2f63393f8320709d8805c31ba73e8ee5d5419601))
+* **api:** api update ([99400db](https://github.com/clear-street/clear-street-java/commit/99400dbe8dd584f36b33b6d250662fa399c9d3b6))
+* **api:** api update ([3d6d5ab](https://github.com/clear-street/clear-street-java/commit/3d6d5ab6dd15f7c8bc1531bccb27a1a9793a9750))
+* **api:** api update ([e9755c9](https://github.com/clear-street/clear-street-java/commit/e9755c970417260e481f1e0f83552777fabc3ad4))
+* **api:** api update ([afbc4cc](https://github.com/clear-street/clear-street-java/commit/afbc4ccf603557090e34d9c8ce85d42008064c84))
+* **api:** api update ([4435f31](https://github.com/clear-street/clear-street-java/commit/4435f31bd53999dee1ba1470170bd8d39ab2ed75))
+* **api:** api update ([3cb8eec](https://github.com/clear-street/clear-street-java/commit/3cb8eecffa17d006a143666247e4e0965710adad))
+* **api:** api update ([fbf70df](https://github.com/clear-street/clear-street-java/commit/fbf70dfef19774d8e6af47c382d0866b786ea0b2))
+* **api:** api update ([0e09a07](https://github.com/clear-street/clear-street-java/commit/0e09a072ba6b2d4734169355929d8b91f6a270a9))
+* **api:** api update ([e2ddaff](https://github.com/clear-street/clear-street-java/commit/e2ddaff65fc8720fdb04385fea0fef5adf290bd2))
+* **api:** api update ([4e01927](https://github.com/clear-street/clear-street-java/commit/4e019271f0a92b4caf85799c0fe8a4039edec5f1))
+* **api:** api update ([9bc4c8b](https://github.com/clear-street/clear-street-java/commit/9bc4c8b546a3589526541f25f8e987ed83aa35b0))
+* **api:** api update ([b27be7e](https://github.com/clear-street/clear-street-java/commit/b27be7ed6619ad6758374049c03689f92cd304d0))
+* **api:** api update ([41e8452](https://github.com/clear-street/clear-street-java/commit/41e8452dfb42fbb923047fa29d03d01b213adee3))
+* **api:** api update ([9aa0a96](https://github.com/clear-street/clear-street-java/commit/9aa0a960e4dd0b18522dbe55080e11da8c098c08))
+* **api:** api update ([006fcf2](https://github.com/clear-street/clear-street-java/commit/006fcf2befbd77f7bfeb45f04a839afa63763e6c))
+* **api:** api update ([615197a](https://github.com/clear-street/clear-street-java/commit/615197a8c2eb2d1b7cf41a24b18d23900494c631))
+* **api:** api update ([fcef82d](https://github.com/clear-street/clear-street-java/commit/fcef82d039b5c6bb7b50f16f45e4022356a92238))
+* **api:** api update ([f8a8d67](https://github.com/clear-street/clear-street-java/commit/f8a8d67031fd0f332f7123300864f35aa1f9bd18))
+* **api:** api update ([b3524d4](https://github.com/clear-street/clear-street-java/commit/b3524d440072d92f11a660228d50224568fe63a5))
+* **api:** api update ([ad4fdee](https://github.com/clear-street/clear-street-java/commit/ad4fdeeab858de30694e70533c9df67581cd7772))
+* **api:** api update ([baaf3af](https://github.com/clear-street/clear-street-java/commit/baaf3af53e9cbf0b06b1b6e46d85e30f7396994a))
+* **api:** api update ([dab98b4](https://github.com/clear-street/clear-street-java/commit/dab98b491979d6adfeeae3e8c5d1d3988e9c79be))
+* **api:** api update ([9e7caf6](https://github.com/clear-street/clear-street-java/commit/9e7caf6f7b42f52681c27bd6075b310e200918b5))
+* **api:** api update ([b382185](https://github.com/clear-street/clear-street-java/commit/b382185f5e651b8933d9398d80a7c56a4b96b413))
+* **api:** api update ([8f45180](https://github.com/clear-street/clear-street-java/commit/8f4518082165cde883d69b2711426dbd719ad0de))
+* **api:** api update ([2e39797](https://github.com/clear-street/clear-street-java/commit/2e39797c7fe89f9d24c0003055b70d7a2b4ac56e))
+* **api:** api update ([58d0a01](https://github.com/clear-street/clear-street-java/commit/58d0a01a409dd26f9a37311379a62bcd2da18915))
+* **api:** api update ([7019336](https://github.com/clear-street/clear-street-java/commit/70193360b94654f4dc6fdc940332d3c111ab6c0f))
+* **api:** api update ([184c903](https://github.com/clear-street/clear-street-java/commit/184c903c1c3a99b3f953dfd891db1830b3e2f649))
+* **api:** api update ([3343acc](https://github.com/clear-street/clear-street-java/commit/3343acc55b8cd665f3a710728320141eb64a2674))
+* **api:** api update ([59fb6e1](https://github.com/clear-street/clear-street-java/commit/59fb6e1f85cdf39f51457aae50bcdf1f0c9721c6))
+* **api:** api update ([0806954](https://github.com/clear-street/clear-street-java/commit/0806954e5efa9b2dd41f764fe78b750e72ac6da9))
+* **api:** manual updates ([7833828](https://github.com/clear-street/clear-street-java/commit/78338288dc75012196e9dfe3a3d0689275bdc2e8))
+* **api:** manual updates ([aeae377](https://github.com/clear-street/clear-street-java/commit/aeae37723b6e5801d368870f448927bf9eb0bfe1))
+* **api:** manual updates ([5446c8a](https://github.com/clear-street/clear-street-java/commit/5446c8aad3ba14922f13eca080d9fdb38758cb8e))
+* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([16ea5b0](https://github.com/clear-street/clear-street-java/commit/16ea5b0358caebad24b92dc9a7beae996aafec5d))
+
+
+### Chores
+
+* redact api-key headers in debug logs ([892ec8e](https://github.com/clear-street/clear-street-java/commit/892ec8e866a3b146366e8625a51eaec09b7a1bb1))
+
## 0.2.0 (2026-05-07)
Full Changelog: [v0.1.0...v0.2.0](https://github.com/clear-street/clear-street-java/compare/v0.1.0...v0.2.0)
diff --git a/README.md b/README.md
index a0ac307a..8d2fe49d 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.clear_street.api/clear-street-java/0.2.0)
-[](https://javadoc.io/doc/com.clear_street.api/clear-street-java/0.2.0)
+[](https://central.sonatype.com/artifact/com.clearstreet.api/clear-street-java/0.3.0)
+[](https://javadoc.io/doc/com.clearstreet.api/clear-street-java/0.3.0)
@@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/).
-Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.clear_street.api/clear-street-java/0.2.0).
+Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.clearstreet.api/clear-street-java/0.3.0).
@@ -24,16 +24,16 @@ Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.clear_street.a
### Gradle
```kotlin
-implementation("com.clear_street.api:clear-street-java:0.2.0")
+implementation("com.clearstreet.api:clear-street-java:0.3.0")
```
### Maven
```xml
- com.clear_street.api
+ com.clearstreet.apiclear-street-java
- 0.2.0
+ 0.3.0
```
@@ -46,10 +46,10 @@ This library requires Java 8 or later.
## Usage
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsParams;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsResponse;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsParams;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsResponse;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
// Configures using the `clearstreet.baseUrl` system property
@@ -66,8 +66,8 @@ AccountGetAccountsResponse response = client.v1().accounts().getAccounts();
Configure the client using system properties or environment variables:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
// Configures using the `clearstreet.baseUrl` system property
@@ -80,8 +80,8 @@ ClearStreetClient client = ClearStreetOkHttpClient.builder()
Or manually:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
.apiKey("My API Key")
@@ -91,8 +91,8 @@ ClearStreetClient client = ClearStreetOkHttpClient.builder()
Or using a combination of the two approaches:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
// Configures using the `clearstreet.baseUrl` system property
@@ -119,7 +119,7 @@ System properties take precedence over environment variables.
To temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:
```java
-import com.clear_street.api.client.ClearStreetClient;
+import com.clearstreet.api.client.ClearStreetClient;
ClearStreetClient clientWithOptions = client.withOptions(optionsBuilder -> {
optionsBuilder.baseUrl("https://example.com");
@@ -148,10 +148,10 @@ Because each class is immutable, builder modification will _never_ affect alread
The default client is synchronous. To switch to asynchronous execution, call the `async()` method:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsParams;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsResponse;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsParams;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsResponse;
import java.util.concurrent.CompletableFuture;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
@@ -167,10 +167,10 @@ CompletableFuture response = client.async().v1().acc
Or create an asynchronous client from the beginning:
```java
-import com.clear_street.api.client.ClearStreetClientAsync;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClientAsync;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsParams;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsResponse;
+import com.clearstreet.api.client.ClearStreetClientAsync;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClientAsync;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsParams;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsResponse;
import java.util.concurrent.CompletableFuture;
ClearStreetClientAsync client = ClearStreetOkHttpClientAsync.builder()
@@ -192,10 +192,10 @@ The SDK defines methods that deserialize responses into instances of Java classe
To access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:
```java
-import com.clear_street.api.core.http.Headers;
-import com.clear_street.api.core.http.HttpResponseFor;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsParams;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsResponse;
+import com.clearstreet.api.core.http.Headers;
+import com.clearstreet.api.core.http.HttpResponseFor;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsParams;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsResponse;
HttpResponseFor response = client.v1().accounts().withRawResponse().getAccounts();
@@ -206,7 +206,7 @@ Headers headers = response.headers();
You can still deserialize the response into an instance of a Java class if needed:
```java
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsResponse;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsResponse;
AccountGetAccountsResponse parsedResponse = response.parse();
```
@@ -215,26 +215,26 @@ AccountGetAccountsResponse parsedResponse = response.parse();
The SDK throws custom unchecked exception types:
-- [`ClearStreetServiceException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/ClearStreetServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:
+- [`ClearStreetServiceException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/ClearStreetServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:
- | Status | Exception |
- | ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
- | 400 | [`BadRequestException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/BadRequestException.kt) |
- | 401 | [`UnauthorizedException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/UnauthorizedException.kt) |
- | 403 | [`PermissionDeniedException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/PermissionDeniedException.kt) |
- | 404 | [`NotFoundException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/NotFoundException.kt) |
- | 422 | [`UnprocessableEntityException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/UnprocessableEntityException.kt) |
- | 429 | [`RateLimitException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/RateLimitException.kt) |
- | 5xx | [`InternalServerException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/InternalServerException.kt) |
- | others | [`UnexpectedStatusCodeException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/UnexpectedStatusCodeException.kt) |
+ | Status | Exception |
+ | ------ | ------------------------------------------------------------------------------------------------------------------------------------- |
+ | 400 | [`BadRequestException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/BadRequestException.kt) |
+ | 401 | [`UnauthorizedException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/UnauthorizedException.kt) |
+ | 403 | [`PermissionDeniedException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/PermissionDeniedException.kt) |
+ | 404 | [`NotFoundException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/NotFoundException.kt) |
+ | 422 | [`UnprocessableEntityException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/UnprocessableEntityException.kt) |
+ | 429 | [`RateLimitException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/RateLimitException.kt) |
+ | 5xx | [`InternalServerException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/InternalServerException.kt) |
+ | others | [`UnexpectedStatusCodeException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/UnexpectedStatusCodeException.kt) |
-- [`ClearStreetIoException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/ClearStreetIoException.kt): I/O networking errors.
+- [`ClearStreetIoException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/ClearStreetIoException.kt): I/O networking errors.
-- [`ClearStreetRetryableException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/ClearStreetRetryableException.kt): Generic error indicating a failure that could be retried by the client.
+- [`ClearStreetRetryableException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/ClearStreetRetryableException.kt): Generic error indicating a failure that could be retried by the client.
-- [`ClearStreetInvalidDataException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/ClearStreetInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that's supposed to be required, but the API unexpectedly omitted it from the response.
+- [`ClearStreetInvalidDataException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/ClearStreetInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that's supposed to be required, but the API unexpectedly omitted it from the response.
-- [`ClearStreetException`](clear-street-java-core/src/main/kotlin/com/clear_street/api/errors/ClearStreetException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.
+- [`ClearStreetException`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/errors/ClearStreetException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.
## Logging
@@ -253,9 +253,9 @@ export CLEAR_STREET_LOG=debug
Or configure the client manually using the `logLevel` method:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
-import com.clear_street.api.core.LogLevel;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.core.LogLevel;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
.fromEnv()
@@ -276,7 +276,7 @@ The SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON seri
The SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).
-If the SDK threw an exception, but you're _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`ClearStreetOkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clear_street/api/client/okhttp/ClearStreetOkHttpClient.kt) or [`ClearStreetOkHttpClientAsync`](clear-street-java-client-okhttp/src/main/kotlin/com/clear_street/api/client/okhttp/ClearStreetOkHttpClientAsync.kt).
+If the SDK threw an exception, but you're _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`ClearStreetOkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clearstreet/api/client/okhttp/ClearStreetOkHttpClient.kt) or [`ClearStreetOkHttpClientAsync`](clear-street-java-client-okhttp/src/main/kotlin/com/clearstreet/api/client/okhttp/ClearStreetOkHttpClientAsync.kt).
> [!CAUTION]
> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.
@@ -302,8 +302,8 @@ The API may also explicitly instruct the SDK to retry or not retry a request.
To set a custom number of retries, configure the client using the `maxRetries` method:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
.fromEnv()
@@ -319,7 +319,7 @@ Requests time out after 1 minute by default.
To set a custom timeout, configure the method call using the `timeout` method:
```java
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsResponse;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsResponse;
AccountGetAccountsResponse response = client.v1().accounts().getAccounts(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());
```
@@ -327,8 +327,8 @@ AccountGetAccountsResponse response = client.v1().accounts().getAccounts(Request
Or configure the default for all method calls at the client level:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
import java.time.Duration;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
@@ -343,8 +343,8 @@ ClearStreetClient client = ClearStreetOkHttpClient.builder()
To route requests through a proxy, configure the client using the `proxy` method:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
import java.net.InetSocketAddress;
import java.net.Proxy;
@@ -362,9 +362,9 @@ ClearStreetClient client = ClearStreetOkHttpClient.builder()
If the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
-import com.clear_street.api.core.http.ProxyAuthenticator;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.core.http.ProxyAuthenticator;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
.fromEnv()
@@ -380,8 +380,8 @@ ClearStreetClient client = ClearStreetOkHttpClient.builder()
To customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
import java.time.Duration;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
@@ -404,8 +404,8 @@ If both options are unset, OkHttp's default connection pool settings are used.
To configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
.fromEnv()
@@ -422,12 +422,12 @@ ClearStreetClient client = ClearStreetOkHttpClient.builder()
The SDK sends requests to the production by default. To send requests to a different environment, configure the client like so:
```java
-import com.clear_street.api.client.ClearStreetClient;
-import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
+import com.clearstreet.api.client.ClearStreetClient;
+import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
ClearStreetClient client = ClearStreetOkHttpClient.builder()
.fromEnv()
- .staging()
+ .dev()
.apiKey("My API Key")
.build();
```
@@ -439,10 +439,10 @@ The SDK consists of three artifacts:
- `clear-street-java-core`
- Contains core SDK logic
- Does not depend on [OkHttp](https://square.github.io/okhttp)
- - Exposes [`ClearStreetClient`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClient.kt), [`ClearStreetClientAsync`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClientAsync.kt), [`ClearStreetClientImpl`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClientImpl.kt), and [`ClearStreetClientAsyncImpl`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClientAsyncImpl.kt), all of which can work with any HTTP client
+ - Exposes [`ClearStreetClient`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClient.kt), [`ClearStreetClientAsync`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClientAsync.kt), [`ClearStreetClientImpl`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClientImpl.kt), and [`ClearStreetClientAsyncImpl`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClientAsyncImpl.kt), all of which can work with any HTTP client
- `clear-street-java-client-okhttp`
- Depends on [OkHttp](https://square.github.io/okhttp)
- - Exposes [`ClearStreetOkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clear_street/api/client/okhttp/ClearStreetOkHttpClient.kt) and [`ClearStreetOkHttpClientAsync`](clear-street-java-client-okhttp/src/main/kotlin/com/clear_street/api/client/okhttp/ClearStreetOkHttpClientAsync.kt), which provide a way to construct [`ClearStreetClientImpl`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClientImpl.kt) and [`ClearStreetClientAsyncImpl`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClientAsyncImpl.kt), respectively, using OkHttp
+ - Exposes [`ClearStreetOkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clearstreet/api/client/okhttp/ClearStreetOkHttpClient.kt) and [`ClearStreetOkHttpClientAsync`](clear-street-java-client-okhttp/src/main/kotlin/com/clearstreet/api/client/okhttp/ClearStreetOkHttpClientAsync.kt), which provide a way to construct [`ClearStreetClientImpl`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClientImpl.kt) and [`ClearStreetClientAsyncImpl`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClientAsyncImpl.kt), respectively, using OkHttp
- `clear-street-java`
- Depends on and exposes the APIs of both `clear-street-java-core` and `clear-street-java-client-okhttp`
- Does not have its own logic
@@ -457,16 +457,16 @@ This structure allows replacing the SDK's default HTTP client without pulling in
To use a customized `OkHttpClient`:
1. Replace your [`clear-street-java` dependency](#installation) with `clear-street-java-core`
-2. Copy `clear-street-java-client-okhttp`'s [`OkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clear_street/api/client/okhttp/OkHttpClient.kt) class into your code and customize it
-3. Construct [`ClearStreetClientImpl`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClientImpl.kt) or [`ClearStreetClientAsyncImpl`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClientAsyncImpl.kt), similarly to [`ClearStreetOkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clear_street/api/client/okhttp/ClearStreetOkHttpClient.kt) or [`ClearStreetOkHttpClientAsync`](clear-street-java-client-okhttp/src/main/kotlin/com/clear_street/api/client/okhttp/ClearStreetOkHttpClientAsync.kt), using your customized client
+2. Copy `clear-street-java-client-okhttp`'s [`OkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clearstreet/api/client/okhttp/OkHttpClient.kt) class into your code and customize it
+3. Construct [`ClearStreetClientImpl`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClientImpl.kt) or [`ClearStreetClientAsyncImpl`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClientAsyncImpl.kt), similarly to [`ClearStreetOkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clearstreet/api/client/okhttp/ClearStreetOkHttpClient.kt) or [`ClearStreetOkHttpClientAsync`](clear-street-java-client-okhttp/src/main/kotlin/com/clearstreet/api/client/okhttp/ClearStreetOkHttpClientAsync.kt), using your customized client
### Completely custom HTTP client
To use a completely custom HTTP client:
1. Replace your [`clear-street-java` dependency](#installation) with `clear-street-java-core`
-2. Write a class that implements the [`HttpClient`](clear-street-java-core/src/main/kotlin/com/clear_street/api/core/http/HttpClient.kt) interface
-3. Construct [`ClearStreetClientImpl`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClientImpl.kt) or [`ClearStreetClientAsyncImpl`](clear-street-java-core/src/main/kotlin/com/clear_street/api/client/ClearStreetClientAsyncImpl.kt), similarly to [`ClearStreetOkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clear_street/api/client/okhttp/ClearStreetOkHttpClient.kt) or [`ClearStreetOkHttpClientAsync`](clear-street-java-client-okhttp/src/main/kotlin/com/clear_street/api/client/okhttp/ClearStreetOkHttpClientAsync.kt), using your new client class
+2. Write a class that implements the [`HttpClient`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/core/http/HttpClient.kt) interface
+3. Construct [`ClearStreetClientImpl`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClientImpl.kt) or [`ClearStreetClientAsyncImpl`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/client/ClearStreetClientAsyncImpl.kt), similarly to [`ClearStreetOkHttpClient`](clear-street-java-client-okhttp/src/main/kotlin/com/clearstreet/api/client/okhttp/ClearStreetOkHttpClient.kt) or [`ClearStreetOkHttpClientAsync`](clear-street-java-client-okhttp/src/main/kotlin/com/clearstreet/api/client/okhttp/ClearStreetOkHttpClientAsync.kt), using your new client class
## Undocumented API functionality
@@ -477,8 +477,8 @@ The SDK is typed for convenient usage of the documented API. However, it also su
To set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:
```java
-import com.clear_street.api.core.JsonValue;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsParams;
+import com.clearstreet.api.core.JsonValue;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsParams;
AccountGetAccountsParams params = AccountGetAccountsParams.builder()
.putAdditionalHeader("Secret-Header", "42")
@@ -492,9 +492,9 @@ These can be accessed on the built object later using the `_additionalHeaders()`
To set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:
```java
-import com.clear_street.api.core.JsonValue;
-import com.clear_street.api.models.v1.accounts.AccountPatchAccountByIdParams;
-import com.clear_street.api.models.v1.accounts.RiskSettings;
+import com.clearstreet.api.core.JsonValue;
+import com.clearstreet.api.models.v1.accounts.AccountPatchAccountByIdParams;
+import com.clearstreet.api.models.v1.accounts.RiskSettings;
AccountPatchAccountByIdParams params = AccountPatchAccountByIdParams.builder()
.risk(RiskSettings.builder()
@@ -505,18 +505,18 @@ AccountPatchAccountByIdParams params = AccountPatchAccountByIdParams.builder()
These properties can be accessed on the nested built object later using the `_additionalProperties()` method.
-To set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](clear-street-java-core/src/main/kotlin/com/clear_street/api/core/Values.kt) object to its setter:
+To set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/core/Values.kt) object to its setter:
```java
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsParams;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsParams;
AccountGetAccountsParams params = AccountGetAccountsParams.builder().build();
```
-The most straightforward way to create a [`JsonValue`](clear-street-java-core/src/main/kotlin/com/clear_street/api/core/Values.kt) is using its `from(...)` method:
+The most straightforward way to create a [`JsonValue`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/core/Values.kt) is using its `from(...)` method:
```java
-import com.clear_street.api.core.JsonValue;
+import com.clearstreet.api.core.JsonValue;
import java.util.List;
import java.util.Map;
@@ -554,14 +554,14 @@ JsonValue complexValue = JsonValue.from(Map.of(
Normally a `Builder` class's `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.
-To forcibly omit a required parameter or property, pass [`JsonMissing`](clear-street-java-core/src/main/kotlin/com/clear_street/api/core/Values.kt):
+To forcibly omit a required parameter or property, pass [`JsonMissing`](clear-street-java-core/src/main/kotlin/com/clearstreet/api/core/Values.kt):
```java
-import com.clear_street.api.core.JsonMissing;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountByIdParams;
-import com.clear_street.api.models.v1.accounts.AccountGetAccountsParams;
+import com.clearstreet.api.core.JsonMissing;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountBalancesParams;
+import com.clearstreet.api.models.v1.accounts.AccountGetAccountsParams;
-AccountGetAccountsParams params = AccountGetAccountByIdParams.builder()
+AccountGetAccountsParams params = AccountGetAccountBalancesParams.builder()
.accountId(JsonMissing.of())
.build();
```
@@ -571,7 +571,7 @@ AccountGetAccountsParams params = AccountGetAccountByIdParams.builder()
To access undocumented response properties, call the `_additionalProperties()` method:
```java
-import com.clear_street.api.core.JsonValue;
+import com.clearstreet.api.core.JsonValue;
import java.util.Map;
Map additionalProperties = client.v1().accounts().getAccounts(params)._additionalProperties();
@@ -601,7 +601,7 @@ String result = secretPropertyValue.accept(new JsonValue.Visitor<>() {
To access a property's raw JSON value, which may be undocumented, call its `_` prefixed method:
```java
-import com.clear_street.api.core.JsonField;
+import com.clearstreet.api.core.JsonField;
import java.util.Optional;
JsonField