Skip to content

Commit 431804c

Browse files
feat(api)!: update model FinancialAccount (#308)
feat(api): add resource `auth_rules.v2` feat(api): add shared model `InstanceFinancialAccountType` feat(api): add shared model `AccountFinancialAccountType` feat(api): add shared model `VelocityLimitParams` and `VelocityLimitParamsPeriodWindow` feat(api): add resource `external_payments` chore(docs): update various doc strings # Migration While changes to `FinancialAccount` are technically breaking change, they are done as a fix to match the actual behaviour of the API.
1 parent 78e33f4 commit 431804c

108 files changed

Lines changed: 30911 additions & 790 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 131
1+
configured_endpoints: 146

lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ interface LithicClient {
6060

6161
fun creditProducts(): CreditProductService
6262

63+
fun externalPayments(): ExternalPaymentService
64+
6365
/** Status of api */
6466
@JvmOverloads
6567
fun apiStatus(

lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ interface LithicClientAsync {
6161

6262
fun creditProducts(): CreditProductServiceAsync
6363

64+
fun externalPayments(): ExternalPaymentServiceAsync
65+
6466
/** Status of api */
6567
@JvmOverloads
6668
fun apiStatus(

lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ constructor(
9898
CreditProductServiceAsyncImpl(clientOptions)
9999
}
100100

101+
private val externalPayments: ExternalPaymentServiceAsync by lazy {
102+
ExternalPaymentServiceAsyncImpl(clientOptions)
103+
}
104+
101105
override fun sync(): LithicClient = sync
102106

103107
override fun accounts(): AccountServiceAsync = accounts
@@ -149,6 +153,8 @@ constructor(
149153

150154
override fun creditProducts(): CreditProductServiceAsync = creditProducts
151155

156+
override fun externalPayments(): ExternalPaymentServiceAsync = externalPayments
157+
152158
private val apiStatusHandler: Handler<ApiStatus> =
153159
jsonHandler<ApiStatus>(clientOptions.jsonMapper).withErrorHandler(errorHandler)
154160

lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ constructor(
9393
CreditProductServiceImpl(clientOptions)
9494
}
9595

96+
private val externalPayments: ExternalPaymentService by lazy {
97+
ExternalPaymentServiceImpl(clientOptions)
98+
}
99+
96100
override fun async(): LithicClientAsync = async
97101

98102
override fun accounts(): AccountService = accounts
@@ -143,6 +147,8 @@ constructor(
143147

144148
override fun creditProducts(): CreditProductService = creditProducts
145149

150+
override fun externalPayments(): ExternalPaymentService = externalPayments
151+
146152
private val apiStatusHandler: Handler<ApiStatus> =
147153
jsonHandler<ApiStatus>(clientOptions.jsonMapper).withErrorHandler(errorHandler)
148154

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// File generated from our OpenAPI spec by Stainless.
2+
3+
package com.lithic.api.models
4+
5+
import com.fasterxml.jackson.annotation.JsonCreator
6+
import com.lithic.api.core.Enum
7+
import com.lithic.api.core.JsonField
8+
import com.lithic.api.core.JsonValue
9+
import com.lithic.api.errors.LithicInvalidDataException
10+
11+
class AccountFinancialAccountType
12+
@JsonCreator
13+
private constructor(
14+
private val value: JsonField<String>,
15+
) : Enum {
16+
17+
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value
18+
19+
override fun equals(other: Any?): Boolean {
20+
if (this === other) {
21+
return true
22+
}
23+
24+
return other is AccountFinancialAccountType && this.value == other.value
25+
}
26+
27+
override fun hashCode() = value.hashCode()
28+
29+
override fun toString() = value.toString()
30+
31+
companion object {
32+
33+
@JvmField val ISSUING = AccountFinancialAccountType(JsonField.of("ISSUING"))
34+
35+
@JvmField val OPERATING = AccountFinancialAccountType(JsonField.of("OPERATING"))
36+
37+
@JvmStatic fun of(value: String) = AccountFinancialAccountType(JsonField.of(value))
38+
}
39+
40+
enum class Known {
41+
ISSUING,
42+
OPERATING,
43+
}
44+
45+
enum class Value {
46+
ISSUING,
47+
OPERATING,
48+
_UNKNOWN,
49+
}
50+
51+
fun value(): Value =
52+
when (this) {
53+
ISSUING -> Value.ISSUING
54+
OPERATING -> Value.OPERATING
55+
else -> Value._UNKNOWN
56+
}
57+
58+
fun known(): Known =
59+
when (this) {
60+
ISSUING -> Known.ISSUING
61+
OPERATING -> Known.OPERATING
62+
else -> throw LithicInvalidDataException("Unknown AccountFinancialAccountType: $value")
63+
}
64+
65+
fun asString(): String = _value().asStringOrThrow()
66+
}

0 commit comments

Comments
 (0)