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
The table of contents is too big for display.
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.100.0"
".": "0.101.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: 169
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-529662462c00af160f74568fe26dbe576cf1fdc9f427e11bb1939bd8acdcb43f.yml
openapi_spec_hash: a98631dfc66716d41ada4ddb199f7028
config_hash: 2d501901f343d00775037fcec4121983
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-aca56b6e4da5b97e586e66392dd3cf433208cb964e25081a661dd41cf456a88a.yml
openapi_spec_hash: 297b9f330d31db8e5832463a0ce455ba
config_hash: 99dad20b4a7d4a1390670762b9da4231
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 0.101.0 (2025-08-13)

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

### Features

* **api:** adds detailed 3DS challenge statuses ([1dc17ba](https://github.com/lithic-com/lithic-java/commit/1dc17bad4eab570e14e2d067a04dcfbfdf7e00c2))


### Chores

* **example:** fix run example comment ([b4a3975](https://github.com/lithic-com/lithic-java/commit/b4a3975dc3331bfc2d6a04e3f66cfce7b1a9e8c8))
* increase max gradle JVM heap to 8GB ([99fb198](https://github.com/lithic-com/lithic-java/commit/99fb198db3839a4e7679f44f143a100136d539d7))
* **internal:** add async lock helper ([f72791f](https://github.com/lithic-com/lithic-java/commit/f72791f75b86e4c3597a40d6fd76edfb98ef1803))
* **internal:** dynamically determine included projects ([12dc83a](https://github.com/lithic-com/lithic-java/commit/12dc83a39ab70881fdeb685ca2a59a9fee35ebdf))
* **internal:** format identity methods ([df0a46a](https://github.com/lithic-com/lithic-java/commit/df0a46a55246472e722c718fa5386eba6c13da94))
* **internal:** support passing arguments to test script ([b1b2e86](https://github.com/lithic-com/lithic-java/commit/b1b2e86e9d4edbec20fe8c68d0929167c848f77d))
* **internal:** update comment in script ([f36b145](https://github.com/lithic-com/lithic-java/commit/f36b145db97f756b4ea77dbe25b1bebad35caa47))
* update @stainless-api/prism-cli to v5.15.0 ([09e01b1](https://github.com/lithic-com/lithic-java/commit/09e01b1e84b9b4f434da61189ebd681b8187e09b))

## 0.100.0 (2025-08-04)

Full Changelog: [v0.99.0...v0.100.0](https://github.com/lithic-com/lithic-java/compare/v0.99.0...v0.100.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.100.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.100.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.100.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.101.0)
[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.101.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.101.0)

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

Expand All @@ -13,7 +13,7 @@ The Lithic Java SDK is similar to the Lithic Kotlin SDK but with minor differenc

<!-- 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.100.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.101.0).

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

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

```kotlin
implementation("com.lithic.api:lithic-java:0.100.0")
implementation("com.lithic.api:lithic-java:0.101.0")
```

### Maven
Expand All @@ -33,7 +33,7 @@ implementation("com.lithic.api:lithic-java:0.100.0")
<dependency>
<groupId>com.lithic.api</groupId>
<artifactId>lithic-java</artifactId>
<version>0.100.0</version>
<version>0.101.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.100.0" // x-release-please-version
version = "0.101.0" // x-release-please-version
}

subprojects {
Expand Down
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ org.gradle.parallel=true
org.gradle.daemon=false
# These options improve our compilation and test performance. They are inherited by the Kotlin daemon.
org.gradle.jvmargs=\
-Xms1g \
-Xmx4g \
-Xms2g \
-Xmx8g \
-XX:+UseParallelGC \
-XX:InitialCodeCacheSize=256m \
-XX:ReservedCodeCacheSize=1G \
-XX:MetaspaceSize=256m \
-XX:MetaspaceSize=512m \
-XX:MaxMetaspaceSize=2G \
-XX:TieredStopAtLevel=1 \
-XX:GCTimeRatio=4 \
-XX:CICompilerCount=4 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,14 @@ private constructor(
return true
}

return /* spotless:off */ other is Timeout && connect == other.connect && read == other.read && write == other.write && request == other.request /* spotless:on */
return other is Timeout &&
connect == other.connect &&
read == other.read &&
write == other.write &&
request == other.request
}

override fun hashCode(): Int = /* spotless:off */ Objects.hash(connect, read, write, request) /* spotless:on */
override fun hashCode(): Int = Objects.hash(connect, read, write, request)

override fun toString() =
"Timeout{connect=$connect, read=$read, write=$write, request=$request}"
Expand Down
23 changes: 23 additions & 0 deletions lithic-java-core/src/main/kotlin/com/lithic/api/core/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import com.lithic.api.core.http.Headers
import com.lithic.api.errors.LithicInvalidDataException
import java.util.Collections
import java.util.SortedMap
import java.util.concurrent.CompletableFuture
import java.util.concurrent.locks.Lock

@JvmSynthetic
internal fun <T : Any> T?.getOrThrow(name: String): T =
Expand Down Expand Up @@ -95,3 +97,24 @@ internal fun Headers.getRequiredHeader(name: String): String =
values(name).firstOrNull() ?: throw LithicInvalidDataException("Could not find $name header")

internal interface Enum

/**
* Executes the given [action] while holding the lock, returning a [CompletableFuture] with the
* result.
*
* @param action The asynchronous action to execute while holding the lock
* @return A [CompletableFuture] that completes with the result of the action
*/
@JvmSynthetic
internal fun <T> Lock.withLockAsync(action: () -> CompletableFuture<T>): CompletableFuture<T> {
lock()
val future =
try {
action()
} catch (e: Throwable) {
unlock()
throw e
}
future.whenComplete { _, _ -> unlock() }
return future
}
75 changes: 57 additions & 18 deletions lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt
Original file line number Diff line number Diff line change
Expand Up @@ -851,12 +851,16 @@ private constructor(
return true
}

return /* spotless:off */ other is SpendLimit && daily == other.daily && lifetime == other.lifetime && monthly == other.monthly && additionalProperties == other.additionalProperties /* spotless:on */
return other is SpendLimit &&
daily == other.daily &&
lifetime == other.lifetime &&
monthly == other.monthly &&
additionalProperties == other.additionalProperties
}

/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(daily, lifetime, monthly, additionalProperties) }
/* spotless:on */
private val hashCode: Int by lazy {
Objects.hash(daily, lifetime, monthly, additionalProperties)
}

override fun hashCode(): Int = hashCode

Expand Down Expand Up @@ -998,7 +1002,7 @@ private constructor(
return true
}

return /* spotless:off */ other is State && value == other.value /* spotless:on */
return other is State && value == other.value
}

override fun hashCode() = value.hashCode()
Expand Down Expand Up @@ -1282,12 +1286,17 @@ private constructor(
return true
}

return /* spotless:off */ other is AccountHolder && token == other.token && businessAccountToken == other.businessAccountToken && email == other.email && phoneNumber == other.phoneNumber && additionalProperties == other.additionalProperties /* spotless:on */
return other is AccountHolder &&
token == other.token &&
businessAccountToken == other.businessAccountToken &&
email == other.email &&
phoneNumber == other.phoneNumber &&
additionalProperties == other.additionalProperties
}

/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(token, businessAccountToken, email, phoneNumber, additionalProperties) }
/* spotless:on */
private val hashCode: Int by lazy {
Objects.hash(token, businessAccountToken, email, phoneNumber, additionalProperties)
}

override fun hashCode(): Int = hashCode

Expand Down Expand Up @@ -1476,7 +1485,7 @@ private constructor(
return true
}

return /* spotless:off */ other is Substatus && value == other.value /* spotless:on */
return other is Substatus && value == other.value
}

override fun hashCode() = value.hashCode()
Expand Down Expand Up @@ -1825,12 +1834,19 @@ private constructor(
return true
}

return /* spotless:off */ other is VerificationAddress && address1 == other.address1 && city == other.city && country == other.country && postalCode == other.postalCode && state == other.state && address2 == other.address2 && additionalProperties == other.additionalProperties /* spotless:on */
return other is VerificationAddress &&
address1 == other.address1 &&
city == other.city &&
country == other.country &&
postalCode == other.postalCode &&
state == other.state &&
address2 == other.address2 &&
additionalProperties == other.additionalProperties
}

/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(address1, city, country, postalCode, state, address2, additionalProperties) }
/* spotless:on */
private val hashCode: Int by lazy {
Objects.hash(address1, city, country, postalCode, state, address2, additionalProperties)
}

override fun hashCode(): Int = hashCode

Expand All @@ -1843,12 +1859,35 @@ private constructor(
return true
}

return /* spotless:off */ other is Account && token == other.token && created == other.created && spendLimit == other.spendLimit && state == other.state && accountHolder == other.accountHolder && authRuleTokens == other.authRuleTokens && cardholderCurrency == other.cardholderCurrency && comment == other.comment && substatus == other.substatus && verificationAddress == other.verificationAddress && additionalProperties == other.additionalProperties /* spotless:on */
return other is Account &&
token == other.token &&
created == other.created &&
spendLimit == other.spendLimit &&
state == other.state &&
accountHolder == other.accountHolder &&
authRuleTokens == other.authRuleTokens &&
cardholderCurrency == other.cardholderCurrency &&
comment == other.comment &&
substatus == other.substatus &&
verificationAddress == other.verificationAddress &&
additionalProperties == other.additionalProperties
}

/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(token, created, spendLimit, state, accountHolder, authRuleTokens, cardholderCurrency, comment, substatus, verificationAddress, additionalProperties) }
/* spotless:on */
private val hashCode: Int by lazy {
Objects.hash(
token,
created,
spendLimit,
state,
accountHolder,
authRuleTokens,
cardholderCurrency,
comment,
substatus,
verificationAddress,
additionalProperties,
)
}

override fun hashCode(): Int = hashCode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,13 @@ private constructor(
return true
}

return /* spotless:off */ other is AccountActivityListPage && service == other.service && params == other.params && response == other.response /* spotless:on */
return other is AccountActivityListPage &&
service == other.service &&
params == other.params &&
response == other.response
}

override fun hashCode(): Int = /* spotless:off */ Objects.hash(service, params, response) /* spotless:on */
override fun hashCode(): Int = Objects.hash(service, params, response)

override fun toString() =
"AccountActivityListPage{service=$service, params=$params, response=$response}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,14 @@ private constructor(
return true
}

return /* spotless:off */ other is AccountActivityListPageAsync && service == other.service && streamHandlerExecutor == other.streamHandlerExecutor && params == other.params && response == other.response /* spotless:on */
return other is AccountActivityListPageAsync &&
service == other.service &&
streamHandlerExecutor == other.streamHandlerExecutor &&
params == other.params &&
response == other.response
}

override fun hashCode(): Int = /* spotless:off */ Objects.hash(service, streamHandlerExecutor, params, response) /* spotless:on */
override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)

override fun toString() =
"AccountActivityListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,13 @@ private constructor(
return true
}

return /* spotless:off */ other is AccountActivityListPageResponse && data == other.data && hasMore == other.hasMore && additionalProperties == other.additionalProperties /* spotless:on */
return other is AccountActivityListPageResponse &&
data == other.data &&
hasMore == other.hasMore &&
additionalProperties == other.additionalProperties
}

/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(data, hasMore, additionalProperties) }
/* spotless:on */

override fun hashCode(): Int = hashCode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ private constructor(
return true
}

return /* spotless:off */ other is TransactionCategory && value == other.value /* spotless:on */
return other is TransactionCategory && value == other.value
}

override fun hashCode() = value.hashCode()
Expand Down Expand Up @@ -688,7 +688,7 @@ private constructor(
return true
}

return /* spotless:off */ other is Result && value == other.value /* spotless:on */
return other is Result && value == other.value
}

override fun hashCode() = value.hashCode()
Expand Down Expand Up @@ -843,7 +843,7 @@ private constructor(
return true
}

return /* spotless:off */ other is Status && value == other.value /* spotless:on */
return other is Status && value == other.value
}

override fun hashCode() = value.hashCode()
Expand All @@ -856,10 +856,36 @@ private constructor(
return true
}

return /* spotless:off */ other is AccountActivityListParams && begin == other.begin && businessAccountToken == other.businessAccountToken && category == other.category && end == other.end && endingBefore == other.endingBefore && financialAccountToken == other.financialAccountToken && pageSize == other.pageSize && result == other.result && startingAfter == other.startingAfter && status == other.status && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */
return other is AccountActivityListParams &&
begin == other.begin &&
businessAccountToken == other.businessAccountToken &&
category == other.category &&
end == other.end &&
endingBefore == other.endingBefore &&
financialAccountToken == other.financialAccountToken &&
pageSize == other.pageSize &&
result == other.result &&
startingAfter == other.startingAfter &&
status == other.status &&
additionalHeaders == other.additionalHeaders &&
additionalQueryParams == other.additionalQueryParams
}

override fun hashCode(): Int = /* spotless:off */ Objects.hash(begin, businessAccountToken, category, end, endingBefore, financialAccountToken, pageSize, result, startingAfter, status, additionalHeaders, additionalQueryParams) /* spotless:on */
override fun hashCode(): Int =
Objects.hash(
begin,
businessAccountToken,
category,
end,
endingBefore,
financialAccountToken,
pageSize,
result,
startingAfter,
status,
additionalHeaders,
additionalQueryParams,
)

override fun toString() =
"AccountActivityListParams{begin=$begin, businessAccountToken=$businessAccountToken, category=$category, end=$end, endingBefore=$endingBefore, financialAccountToken=$financialAccountToken, pageSize=$pageSize, result=$result, startingAfter=$startingAfter, status=$status, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
Expand Down
Loading
Loading