Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
timeout-minutes: 15
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
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
Expand All @@ -46,7 +46,7 @@ jobs:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
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
Expand Down
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.122.0"
".": "0.123.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 190
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-17c04dd1b0508b380c21e3acc3d4cd1e86b590f81d14fa26d1973b236f660e38.yml
openapi_spec_hash: f8ddee07358d2c938450a6889fbf7940
config_hash: edbdfefeb0d3d927c2f9fe3402793215
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-df28ee30a3bd4fa595befc2048216e1ee1d3845fcfcf179c1c694ba58fd5e4ed.yml
openapi_spec_hash: 79bfc19d85c7f03754684d794653e333
config_hash: 5eca052bb23d273fa970eac3127dd919
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 0.123.0 (2026-04-10)

Full Changelog: [v0.122.0...v0.123.0](https://github.com/lithic-com/lithic-java/compare/v0.122.0...v0.123.0)

### Features

* **api:** add card decline count values to conditional authorization ([65f1c4b](https://github.com/lithic-com/lithic-java/commit/65f1c4b2a4c28c8a9fbc07a187fb01cf4567461c))
* **api:** add INTERCHANGE, CHARGEBACK, PROVISIONAL_CREDIT_ACCOUNT to financial account types ([a06a494](https://github.com/lithic-com/lithic-java/commit/a06a49406fc967ebb0047ea96a2e6b2f5405d101))
* **api:** add override_company_name parameter to payment create ([899a3be](https://github.com/lithic-com/lithic-java/commit/899a3be4a06965cf3a37cf4ddf6f8581fac9351a))
* **api:** add statement_totals field to Statement/StatementsCreatedWebhookEvent ([44d890e](https://github.com/lithic-com/lithic-java/commit/44d890e17988a1e587124a95afe3984c99a3bca0))
* **api:** add transaction_token field to BacktestStats/ReportStats examples ([b4209cb](https://github.com/lithic-com/lithic-java/commit/b4209cb157f545e04f1dab41185c7d4e0aae4628))
* **api:** add transaction_token to authorization/authentication3ds/tokenization/ach results ([5bf85e9](https://github.com/lithic-com/lithic-java/commit/5bf85e90787b46c68077f7107165580991bbec97))


### Bug Fixes

* **types:** make creditProductToken optional in Statement ([f655477](https://github.com/lithic-com/lithic-java/commit/f655477b2d6a9bd20d869599f21dd2910ed3f809))
* **types:** make data and has_more required in AccountActivityListPageResponse ([5feba92](https://github.com/lithic-com/lithic-java/commit/5feba92cc13a3877fb2769d8808e65959b4b12b9))
* **types:** remove hostname, make fields required in AsaRequestCard ([67cbf7d](https://github.com/lithic-com/lithic-java/commit/67cbf7d5138afeae5b76339972c28fa63fbc3e30))
* **types:** remove INTERCHANGE and CHARGEBACK from FinancialAccount and InstanceFinancialAccountType ([21b74ec](https://github.com/lithic-com/lithic-java/commit/21b74ec6a8478a4cbe3ea665f3f46496eba09402))


### Chores

* **ci:** skip lint on metadata-only changes ([c266aa2](https://github.com/lithic-com/lithic-java/commit/c266aa2a776ae772b05a025dab383477ec5c2d0d))
* **types:** [breaking] remove deprecated fields from ReportStats and Example models ([634a6e2](https://github.com/lithic-com/lithic-java/commit/634a6e237a00f443864fd8e4b8b26344dc83160d))


### Documentation

* **api:** update natureOfBusiness and qrCodeUrl parameter descriptions ([2fe328d](https://github.com/lithic-com/lithic-java/commit/2fe328dff29b7df2d9096274e5725e1bf37df25f))

## 0.122.0 (2026-03-23)

Full Changelog: [v0.121.0...v0.122.0](https://github.com/lithic-com/lithic-java/compare/v0.121.0...v0.122.0)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

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

[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.122.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.122.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.122.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.123.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.123.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.123.0)

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

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

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

The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.122.0).
The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.123.0).

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

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

```kotlin
implementation("com.lithic.api:lithic-java:0.122.0")
implementation("com.lithic.api:lithic-java:0.123.0")
```

### Maven
Expand All @@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.122.0")
<dependency>
<groupId>com.lithic.api</groupId>
<artifactId>lithic-java</artifactId>
<version>0.122.0</version>
<version>0.123.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.lithic.api"
version = "0.122.0" // x-release-please-version
version = "0.123.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonMissing
import com.lithic.api.core.JsonValue
import com.lithic.api.core.checkKnown
import com.lithic.api.core.checkRequired
import com.lithic.api.core.toImmutable
import com.lithic.api.errors.LithicInvalidDataException
import java.util.Collections
import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull

/** A response containing a list of transactions */
Expand All @@ -36,18 +36,18 @@ private constructor(
) : this(data, hasMore, mutableMapOf())

/**
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
fun data(): Optional<List<AccountActivityListResponse>> = data.getOptional("data")
fun data(): List<AccountActivityListResponse> = data.getRequired("data")

/**
* Indicates if there are more transactions available for pagination
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
* @throws LithicInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
fun hasMore(): Optional<Boolean> = hasMore.getOptional("has_more")
fun hasMore(): Boolean = hasMore.getRequired("has_more")

/**
* Returns the raw JSON value of [data].
Expand Down Expand Up @@ -82,6 +82,12 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
* [AccountActivityListPageResponse].
*
* The following fields are required:
* ```java
* .data()
* .hasMore()
* ```
*/
@JvmStatic fun builder() = Builder()
}
Expand All @@ -90,7 +96,7 @@ private constructor(
class Builder internal constructor() {

private var data: JsonField<MutableList<AccountActivityListResponse>>? = null
private var hasMore: JsonField<Boolean> = JsonMissing.of()
private var hasMore: JsonField<Boolean>? = null
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
Expand Down Expand Up @@ -193,11 +199,19 @@ private constructor(
* Returns an immutable instance of [AccountActivityListPageResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
* The following fields are required:
* ```java
* .data()
* .hasMore()
* ```
*
* @throws IllegalStateException if any required field is unset.
*/
fun build(): AccountActivityListPageResponse =
AccountActivityListPageResponse(
(data ?: JsonMissing.of()).map { it.toImmutable() },
hasMore,
checkRequired("data", data).map { it.toImmutable() },
checkRequired("hasMore", hasMore),
additionalProperties.toMutableMap(),
)
}
Expand All @@ -209,7 +223,7 @@ private constructor(
return@apply
}

data().ifPresent { it.forEach { it.validate() } }
data().forEach { it.validate() }
hasMore()
validated = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ private constructor(
private val decision: JsonField<Decision>,
private val eventToken: JsonField<String>,
private val timestamp: JsonField<OffsetDateTime>,
private val transactionToken: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
) {

Expand All @@ -334,7 +335,10 @@ private constructor(
@JsonProperty("timestamp")
@ExcludeMissing
timestamp: JsonField<OffsetDateTime> = JsonMissing.of(),
) : this(decision, eventToken, timestamp, mutableMapOf())
@JsonProperty("transaction_token")
@ExcludeMissing
transactionToken: JsonField<String> = JsonMissing.of(),
) : this(decision, eventToken, timestamp, transactionToken, mutableMapOf())

/**
* The decision made by the rule for this event.
Expand All @@ -360,6 +364,14 @@ private constructor(
*/
fun timestamp(): Optional<OffsetDateTime> = timestamp.getOptional("timestamp")

/**
* The token of the transaction associated with the event
*
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun transactionToken(): Optional<String> = transactionToken.getOptional("transaction_token")

/**
* Returns the raw JSON value of [decision].
*
Expand All @@ -385,6 +397,16 @@ private constructor(
@ExcludeMissing
fun _timestamp(): JsonField<OffsetDateTime> = timestamp

/**
* Returns the raw JSON value of [transactionToken].
*
* Unlike [transactionToken], this method doesn't throw if the JSON field has an unexpected
* type.
*/
@JsonProperty("transaction_token")
@ExcludeMissing
fun _transactionToken(): JsonField<String> = transactionToken

@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
Expand All @@ -409,13 +431,15 @@ private constructor(
private var decision: JsonField<Decision> = JsonMissing.of()
private var eventToken: JsonField<String> = JsonMissing.of()
private var timestamp: JsonField<OffsetDateTime> = JsonMissing.of()
private var transactionToken: JsonField<String> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
internal fun from(example: Example) = apply {
decision = example.decision
eventToken = example.eventToken
timestamp = example.timestamp
transactionToken = example.transactionToken
additionalProperties = example.additionalProperties.toMutableMap()
}

Expand Down Expand Up @@ -457,6 +481,27 @@ private constructor(
this.timestamp = timestamp
}

/** The token of the transaction associated with the event */
fun transactionToken(transactionToken: String?) =
transactionToken(JsonField.ofNullable(transactionToken))

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

/**
* Sets [Builder.transactionToken] to an arbitrary JSON value.
*
* You should usually call [Builder.transactionToken] with a well-typed [String] value
* instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
fun transactionToken(transactionToken: JsonField<String>) = apply {
this.transactionToken = transactionToken
}

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand All @@ -482,7 +527,13 @@ private constructor(
* Further updates to this [Builder] will not mutate the returned instance.
*/
fun build(): Example =
Example(decision, eventToken, timestamp, additionalProperties.toMutableMap())
Example(
decision,
eventToken,
timestamp,
transactionToken,
additionalProperties.toMutableMap(),
)
}

private var validated: Boolean = false
Expand All @@ -495,6 +546,7 @@ private constructor(
decision().ifPresent { it.validate() }
eventToken()
timestamp()
transactionToken()
validated = true
}

Expand All @@ -516,7 +568,8 @@ private constructor(
internal fun validity(): Int =
(decision.asKnown().getOrNull()?.validity() ?: 0) +
(if (eventToken.asKnown().isPresent) 1 else 0) +
(if (timestamp.asKnown().isPresent) 1 else 0)
(if (timestamp.asKnown().isPresent) 1 else 0) +
(if (transactionToken.asKnown().isPresent) 1 else 0)

/** The decision made by the rule for this event. */
class Decision @JsonCreator private constructor(private val value: JsonField<String>) :
Expand Down Expand Up @@ -664,17 +717,18 @@ private constructor(
decision == other.decision &&
eventToken == other.eventToken &&
timestamp == other.timestamp &&
transactionToken == other.transactionToken &&
additionalProperties == other.additionalProperties
}

private val hashCode: Int by lazy {
Objects.hash(decision, eventToken, timestamp, additionalProperties)
Objects.hash(decision, eventToken, timestamp, transactionToken, additionalProperties)
}

override fun hashCode(): Int = hashCode

override fun toString() =
"Example{decision=$decision, eventToken=$eventToken, timestamp=$timestamp, additionalProperties=$additionalProperties}"
"Example{decision=$decision, eventToken=$eventToken, timestamp=$timestamp, transactionToken=$transactionToken, additionalProperties=$additionalProperties}"
}

override fun equals(other: Any?): Boolean {
Expand Down
Loading
Loading