Skip to content
Open
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.125.0"
".": "0.126.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 191
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0f374e78a0212145a2f55a55dfc39a612de19094d5152ae26b1bc74b01b9e343.yml
openapi_spec_hash: ec888cdaebea979a2cd6231ca04c346c
config_hash: 01dfc901bb6d54b0f582155d779bcbe0
configured_endpoints: 193
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-00f07b0edcc0c3c5ef79920ced7f58dac2434df5e4c27ff6041783e8228315f9.yml
openapi_spec_hash: 963688b09480159a06865075c94a2577
config_hash: 265a2b679964f4ad5706de101ad2a942
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.126.0 (2026-05-08)

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

### Features

* **api:** add retrieve signals method to accounts and cards ([767ea0d](https://github.com/lithic-com/lithic-java/commit/767ea0d26ee83791aa33f7ce96091d87fcd2f3e0))
* **api:** add travel/distance attributes, unit param to authorization actions ([f5d17dc](https://github.com/lithic-com/lithic-java/commit/f5d17dcfe179f2612c3b1f93504948b5097bb69b))


### Chores

* redact api-key headers in debug logs ([7bcf3e6](https://github.com/lithic-com/lithic-java/commit/7bcf3e6916b9cbc628a78e0a97d78057cab7fe3a))

## 0.125.0 (2026-05-06)

Full Changelog: [v0.124.0...v0.125.0](https://github.com/lithic-com/lithic-java/compare/v0.124.0...v0.125.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.125.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.125.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.125.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.126.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.126.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.126.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.125.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.126.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.125.0")
implementation("com.lithic.api:lithic-java:0.126.0")
```

### Maven
Expand All @@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.125.0")
<dependency>
<groupId>com.lithic.api</groupId>
<artifactId>lithic-java</artifactId>
<version>0.125.0</version>
<version>0.126.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.125.0" // x-release-please-version
version = "0.126.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private constructor(
/**
* Sensitive headers to redact from logs.
*
* Defaults to `Set.of("Authorization")`.
* Defaults to `Set.of("authorization", "api-key", "x-api-key", "cookie", "set-cookie")`.
*/
@get:JvmName("redactedHeaders") val redactedHeaders: SortedSet<String>,
/**
Expand Down Expand Up @@ -192,7 +192,8 @@ private constructor(
class Builder internal constructor() {

private var httpClient: HttpClient? = null
private var redactedHeaders: Set<String> = setOf("Authorization")
private var redactedHeaders: Set<String> =
setOf("authorization", "api-key", "x-api-key", "cookie", "set-cookie")
private var clock: Clock = Clock.systemUTC()
private var level: LogLevel? = null

Expand All @@ -210,7 +211,7 @@ private constructor(
/**
* Sensitive headers to redact from logs.
*
* Defaults to `Set.of("Authorization")`.
* Defaults to `Set.of("authorization", "api-key", "x-api-key", "cookie", "set-cookie")`.
*/
fun redactedHeaders(redactedHeaders: Set<String>) = apply {
this.redactedHeaders = redactedHeaders
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
// File generated from our OpenAPI spec by Stainless.

package com.lithic.api.models

import com.lithic.api.core.Params
import com.lithic.api.core.http.Headers
import com.lithic.api.core.http.QueryParams
import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull

/**
* Returns behavioral feature state derived from an account's transaction history.
*
* These signals expose the same data used by behavioral rule attributes (e.g. `AMOUNT_Z_SCORE` with
* `scope: ACCOUNT`, `IS_NEW_COUNTRY` with `scope: ACCOUNT`) and custom code
* `TRANSACTION_HISTORY_SIGNALS` features, allowing clients to inspect feature values before writing
* rules and debug rule behavior.
*
* Note: 3DS fields are not available at the account scope and will be null.
*/
class AccountRetrieveSignalsParams
private constructor(
private val accountToken: String?,
private val additionalHeaders: Headers,
private val additionalQueryParams: QueryParams,
) : Params {

fun accountToken(): Optional<String> = Optional.ofNullable(accountToken)

/** Additional headers to send with the request. */
fun _additionalHeaders(): Headers = additionalHeaders

/** Additional query param to send with the request. */
fun _additionalQueryParams(): QueryParams = additionalQueryParams

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

companion object {

@JvmStatic fun none(): AccountRetrieveSignalsParams = builder().build()

/**
* Returns a mutable builder for constructing an instance of [AccountRetrieveSignalsParams].
*/
@JvmStatic fun builder() = Builder()
}

/** A builder for [AccountRetrieveSignalsParams]. */
class Builder internal constructor() {

private var accountToken: String? = null
private var additionalHeaders: Headers.Builder = Headers.builder()
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()

@JvmSynthetic
internal fun from(accountRetrieveSignalsParams: AccountRetrieveSignalsParams) = apply {
accountToken = accountRetrieveSignalsParams.accountToken
additionalHeaders = accountRetrieveSignalsParams.additionalHeaders.toBuilder()
additionalQueryParams = accountRetrieveSignalsParams.additionalQueryParams.toBuilder()
}

fun accountToken(accountToken: String?) = apply { this.accountToken = accountToken }

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

fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
putAllAdditionalHeaders(additionalHeaders)
}

fun additionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
this.additionalHeaders.clear()
putAllAdditionalHeaders(additionalHeaders)
}

fun putAdditionalHeader(name: String, value: String) = apply {
additionalHeaders.put(name, value)
}

fun putAdditionalHeaders(name: String, values: Iterable<String>) = apply {
additionalHeaders.put(name, values)
}

fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.putAll(additionalHeaders)
}

fun putAllAdditionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
this.additionalHeaders.putAll(additionalHeaders)
}

fun replaceAdditionalHeaders(name: String, value: String) = apply {
additionalHeaders.replace(name, value)
}

fun replaceAdditionalHeaders(name: String, values: Iterable<String>) = apply {
additionalHeaders.replace(name, values)
}

fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.replaceAll(additionalHeaders)
}

fun replaceAllAdditionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
this.additionalHeaders.replaceAll(additionalHeaders)
}

fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }

fun removeAllAdditionalHeaders(names: Set<String>) = apply {
additionalHeaders.removeAll(names)
}

fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
this.additionalQueryParams.clear()
putAllAdditionalQueryParams(additionalQueryParams)
}

fun additionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) = apply {
this.additionalQueryParams.clear()
putAllAdditionalQueryParams(additionalQueryParams)
}

fun putAdditionalQueryParam(key: String, value: String) = apply {
additionalQueryParams.put(key, value)
}

fun putAdditionalQueryParams(key: String, values: Iterable<String>) = apply {
additionalQueryParams.put(key, values)
}

fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
this.additionalQueryParams.putAll(additionalQueryParams)
}

fun putAllAdditionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) =
apply {
this.additionalQueryParams.putAll(additionalQueryParams)
}

fun replaceAdditionalQueryParams(key: String, value: String) = apply {
additionalQueryParams.replace(key, value)
}

fun replaceAdditionalQueryParams(key: String, values: Iterable<String>) = apply {
additionalQueryParams.replace(key, values)
}

fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
this.additionalQueryParams.replaceAll(additionalQueryParams)
}

fun replaceAllAdditionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) =
apply {
this.additionalQueryParams.replaceAll(additionalQueryParams)
}

fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }

fun removeAllAdditionalQueryParams(keys: Set<String>) = apply {
additionalQueryParams.removeAll(keys)
}

/**
* Returns an immutable instance of [AccountRetrieveSignalsParams].
*
* Further updates to this [Builder] will not mutate the returned instance.
*/
fun build(): AccountRetrieveSignalsParams =
AccountRetrieveSignalsParams(
accountToken,
additionalHeaders.build(),
additionalQueryParams.build(),
)
}

fun _pathParam(index: Int): String =
when (index) {
0 -> accountToken ?: ""
else -> ""
}

override fun _headers(): Headers = additionalHeaders

override fun _queryParams(): QueryParams = additionalQueryParams

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return other is AccountRetrieveSignalsParams &&
accountToken == other.accountToken &&
additionalHeaders == other.additionalHeaders &&
additionalQueryParams == other.additionalQueryParams
}

override fun hashCode(): Int =
Objects.hash(accountToken, additionalHeaders, additionalQueryParams)

override fun toString() =
"AccountRetrieveSignalsParams{accountToken=$accountToken, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
}
Loading
Loading