Skip to content
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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.4.0"
".": "0.5.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-d9763d006969b49a1473851069fdfa429eb13133b64103a62963bb70ddb22305.yml
openapi_spec_hash: 6aee689b7a759b12c85c088c15e29bc0
config_hash: 4ab3e1ee76a463e0ed214541260ee12e
config_hash: 5509bb7a961ae2e79114b24c381606d4
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.5.0 (2026-02-23)

Full Changelog: [v0.4.0...v0.5.0](https://github.com/CASParser/cas-parser-java/compare/v0.4.0...v0.5.0)

### Features

* **api:** manual updates ([01972fc](https://github.com/CASParser/cas-parser-java/commit/01972fc275820dcd38c6c03a3ff7dd2feb8ab6a0))

## 0.4.0 (2026-02-23)

Full Changelog: [v0.3.0...v0.4.0](https://github.com/CASParser/cas-parser-java/compare/v0.3.0...v0.4.0)
Expand Down
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.cas_parser.api/cas-parser-java)](https://central.sonatype.com/artifact/com.cas_parser.api/cas-parser-java/0.4.0)
[![javadoc](https://javadoc.io/badge2/com.cas_parser.api/cas-parser-java/0.4.0/javadoc.svg)](https://javadoc.io/doc/com.cas_parser.api/cas-parser-java/0.4.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.cas_parser.api/cas-parser-java)](https://central.sonatype.com/artifact/com.cas_parser.api/cas-parser-java/0.5.0)
[![javadoc](https://javadoc.io/badge2/com.cas_parser.api/cas-parser-java/0.5.0/javadoc.svg)](https://javadoc.io/doc/com.cas_parser.api/cas-parser-java/0.5.0)

<!-- x-release-please-end -->

The Cas Parser Java SDK provides convenient access to the [Cas Parser REST API](https://docs.casparser.in) from applications written in Java.
The Cas Parser Java SDK provides convenient access to the [Cas Parser REST API](https://casparser.in/docs) from applications written in Java.

It is generated with [Stainless](https://www.stainless.com/).

Expand All @@ -22,7 +22,7 @@ Use the Cas Parser MCP Server to enable AI assistants to interact with this API,

<!-- x-release-please-start-version -->

The REST API documentation can be found on [docs.casparser.in](https://docs.casparser.in). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.cas_parser.api/cas-parser-java/0.4.0).
The REST API documentation can be found on [casparser.in](https://casparser.in/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.cas_parser.api/cas-parser-java/0.5.0).

<!-- x-release-please-end -->

Expand All @@ -33,7 +33,7 @@ The REST API documentation can be found on [docs.casparser.in](https://docs.casp
### Gradle

```kotlin
implementation("com.cas_parser.api:cas-parser-java:0.4.0")
implementation("com.cas_parser.api:cas-parser-java:0.5.0")
```

### Maven
Expand All @@ -42,7 +42,7 @@ implementation("com.cas_parser.api:cas-parser-java:0.4.0")
<dependency>
<groupId>com.cas_parser.api</groupId>
<artifactId>cas-parser-java</artifactId>
<version>0.4.0</version>
<version>0.5.0</version>
</dependency>
```

Expand Down Expand Up @@ -107,10 +107,10 @@ CasParserClient client = CasParserOkHttpClient.builder()

See this table for the available options:

| Setter | System property | Environment variable | Required | Default value |
| --------- | ------------------- | --------------------- | -------- | --------------------------------------------- |
| `apiKey` | `casparser.apiKey` | `CAS_PARSER_API_KEY` | true | - |
| `baseUrl` | `casparser.baseUrl` | `CAS_PARSER_BASE_URL` | true | `"https://portfolio-parser.api.casparser.in"` |
| Setter | System property | Environment variable | Required | Default value |
| --------- | ------------------- | --------------------- | -------- | ---------------------------- |
| `apiKey` | `casparser.apiKey` | `CAS_PARSER_API_KEY` | true | - |
| `baseUrl` | `casparser.baseUrl` | `CAS_PARSER_BASE_URL` | true | `"https://api.casparser.in"` |

System properties take precedence over environment variables.

Expand Down Expand Up @@ -382,21 +382,6 @@ CasParserClient client = CasParserOkHttpClient.builder()
.build();
```

### Environments

The SDK sends requests to the production by default. To send requests to a different environment, configure the client like so:

```java
import com.cas_parser.api.client.CasParserClient;
import com.cas_parser.api.client.okhttp.CasParserOkHttpClient;

CasParserClient client = CasParserOkHttpClient.builder()
.fromEnv()
// Other options include `environment2`
.environment1()
.build();
```

### Custom HTTP client

The SDK consists of three artifacts:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {

allprojects {
group = "com.cas_parser.api"
version = "0.4.0" // x-release-please-version
version = "0.5.0" // x-release-please-version
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/cas-parser.publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ configure<PublishingExtension> {
pom {
name.set("CAS Parser - Track Portfolios from CDSL, NSDL, CAMS, KFintech")
description.set("API for parsing and analyzing CAS (Consolidated Account Statement) PDF files\nfrom NSDL, CDSL, and CAMS/KFintech, with a unified response format")
url.set("https://docs.casparser.in")
url.set("https://casparser.in/docs")

licenses {
license {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,13 @@ class CasParserOkHttpClient private constructor() {
/**
* The base URL to use for every request.
*
* Defaults to the production environment: `https://portfolio-parser.api.casparser.in`.
*
* The following other environments, with dedicated builder methods, are available:
* - environment_1: `https://client-apis.casparser.in`
* - environment_2: `http://localhost:5000`
* Defaults to the production environment: `https://api.casparser.in`.
*/
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }

/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())

/** Sets [baseUrl] to `https://client-apis.casparser.in`. */
fun environment1() = apply { clientOptions.environment1() }

/** Sets [baseUrl] to `http://localhost:5000`. */
fun environment2() = apply { clientOptions.environment2() }

/**
* Whether to call `validate` on every response before returning it.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,13 @@ class CasParserOkHttpClientAsync private constructor() {
/**
* The base URL to use for every request.
*
* Defaults to the production environment: `https://portfolio-parser.api.casparser.in`.
*
* The following other environments, with dedicated builder methods, are available:
* - environment_1: `https://client-apis.casparser.in`
* - environment_2: `http://localhost:5000`
* Defaults to the production environment: `https://api.casparser.in`.
*/
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }

/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())

/** Sets [baseUrl] to `https://client-apis.casparser.in`. */
fun environment1() = apply { clientOptions.environment1() }

/** Sets [baseUrl] to `http://localhost:5000`. */
fun environment2() = apply { clientOptions.environment2() }

/**
* Whether to call `validate` on every response before returning it.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,15 @@ private constructor(
/**
* The base URL to use for every request.
*
* Defaults to the production environment: `https://portfolio-parser.api.casparser.in`.
*
* The following other environments, with dedicated builder methods, are available:
* - environment_1: `https://client-apis.casparser.in`
* - environment_2: `http://localhost:5000`
* Defaults to the production environment: `https://api.casparser.in`.
*/
fun baseUrl(): String = baseUrl ?: PRODUCTION_URL

fun toBuilder() = Builder().from(this)

companion object {

const val PRODUCTION_URL = "https://portfolio-parser.api.casparser.in"

const val ENVIRONMENT_1_URL = "https://client-apis.casparser.in"

const val ENVIRONMENT_2_URL = "http://localhost:5000"
const val PRODUCTION_URL = "https://api.casparser.in"

/**
* Returns a mutable builder for constructing an instance of [ClientOptions].
Expand Down Expand Up @@ -228,23 +220,13 @@ private constructor(
/**
* The base URL to use for every request.
*
* Defaults to the production environment: `https://portfolio-parser.api.casparser.in`.
*
* The following other environments, with dedicated builder methods, are available:
* - environment_1: `https://client-apis.casparser.in`
* - environment_2: `http://localhost:5000`
* Defaults to the production environment: `https://api.casparser.in`.
*/
fun baseUrl(baseUrl: String?) = apply { this.baseUrl = baseUrl }

/** Alias for calling [Builder.baseUrl] with `baseUrl.orElse(null)`. */
fun baseUrl(baseUrl: Optional<String>) = baseUrl(baseUrl.getOrNull())

/** Sets [baseUrl] to `https://client-apis.casparser.in`. */
fun environment1() = baseUrl(ENVIRONMENT_1_URL)

/** Sets [baseUrl] to `http://localhost:5000`. */
fun environment2() = baseUrl(ENVIRONMENT_2_URL)

/**
* Whether to call `validate` on every response before returning it.
*
Expand Down Expand Up @@ -379,10 +361,10 @@ private constructor(
*
* See this table for the available options:
*
* |Setter |System property |Environment variable |Required|Default value |
* |---------|-------------------|---------------------|--------|---------------------------------------------|
* |`apiKey` |`casparser.apiKey` |`CAS_PARSER_API_KEY` |true |- |
* |`baseUrl`|`casparser.baseUrl`|`CAS_PARSER_BASE_URL`|true |`"https://portfolio-parser.api.casparser.in"`|
* |Setter |System property |Environment variable |Required|Default value |
* |---------|-------------------|---------------------|--------|----------------------------|
* |`apiKey` |`casparser.apiKey` |`CAS_PARSER_API_KEY` |true |- |
* |`baseUrl`|`casparser.baseUrl`|`CAS_PARSER_BASE_URL`|true |`"https://api.casparser.in"`|
*
* System properties take precedence over environment variables.
*/
Expand Down
Loading