Skip to content

Commit 7b5c3d7

Browse files
committed
Bump for '276c3bb'
1 parent 2df4750 commit 7b5c3d7

53 files changed

Lines changed: 1634 additions & 458 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.

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

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,52 @@ package com.lithic.api.client.okhttp
33
import com.lithic.api.core.ClientOptions
44
import com.lithic.api.models.ClientApiStatusParams
55
import com.lithic.api.services.*
6+
import com.lithic.api.services.blocking.*
67
import java.time.Duration
8+
import kotlin.LazyThreadSafetyMode.PUBLICATION
79

810
class LithicClient private constructor(private val clientOptions: ClientOptions) {
9-
@get:JvmName("accounts") val accounts: AccountService by lazy { AccountService(clientOptions) }
11+
private val accounts: AccountService by lazy(PUBLICATION) { AccountServiceImpl(clientOptions) }
12+
private val accountHolders: AccountHolderService by
13+
lazy(PUBLICATION) { AccountHolderServiceImpl(clientOptions) }
14+
private val authRules: AuthRuleService by
15+
lazy(PUBLICATION) { AuthRuleServiceImpl(clientOptions) }
16+
private val authStreamEnrollment: AuthStreamEnrollmentService by
17+
lazy(PUBLICATION) { AuthStreamEnrollmentServiceImpl(clientOptions) }
18+
private val cards: CardService by lazy(PUBLICATION) { CardServiceImpl(clientOptions) }
19+
private val fundingSources: FundingSourceService by
20+
lazy(PUBLICATION) { FundingSourceServiceImpl(clientOptions) }
21+
private val transactions: TransactionService by
22+
lazy(PUBLICATION) { TransactionServiceImpl(clientOptions) }
1023

11-
@get:JvmName("accountHolders")
12-
val accountHolders: AccountHolderService by lazy { AccountHolderService(clientOptions) }
24+
private val lithicClientInternalService: LithicClientInternalServiceImpl by
25+
lazy(PUBLICATION) { LithicClientInternalServiceImpl(clientOptions) }
1326

14-
@get:JvmName("authRules")
15-
val authRules: AuthRuleService by lazy { AuthRuleService(clientOptions) }
27+
fun accounts(): AccountService = accounts
1628

17-
@get:JvmName("authStreamEnrollment")
18-
val authStreamEnrollment: AuthStreamEnrollmentService by lazy {
19-
AuthStreamEnrollmentService(clientOptions)
20-
}
29+
fun accountHolders(): AccountHolderService = accountHolders
2130

22-
@get:JvmName("cards") val cards: CardService by lazy { CardService(clientOptions) }
31+
fun authRules(): AuthRuleService = authRules
2332

24-
@get:JvmName("fundingSources")
25-
val fundingSources: FundingSourceService by lazy { FundingSourceService(clientOptions) }
33+
fun authStreamEnrollment(): AuthStreamEnrollmentService = authStreamEnrollment
2634

27-
@get:JvmName("transactions")
28-
val transactions: TransactionService by lazy { TransactionService(clientOptions) }
35+
fun cards(): CardService = cards
2936

30-
private val lithicClientInternalService: LithicClientInternalService by lazy {
31-
LithicClientInternalService(clientOptions)
32-
}
37+
fun fundingSources(): FundingSourceService = fundingSources
38+
39+
fun transactions(): TransactionService = transactions
40+
41+
fun lithicClientInternalService(): LithicClientInternalService = lithicClientInternalService
42+
43+
/** API status check */
44+
fun apiStatus(params: ClientApiStatusParams) = lithicClientInternalService.apiStatus(params)
3345

3446
companion object {
3547
@JvmStatic fun builder() = Builder()
3648

3749
@JvmStatic fun fromEnv(): LithicClient = builder().fromEnv().build()
3850
}
3951

40-
/** API status check */
41-
fun apiStatus(params: ClientApiStatusParams) = lithicClientInternalService.apiStatus(params)
42-
4352
class Builder {
4453
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
4554
private var baseUrl: String = ClientOptions.PRODUCTION_URL

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

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,54 @@ package com.lithic.api.client.okhttp
33
import com.lithic.api.core.ClientOptions
44
import com.lithic.api.models.ClientApiStatusParams
55
import com.lithic.api.services.*
6+
import com.lithic.api.services.async.*
67
import java.time.Duration
8+
import kotlin.LazyThreadSafetyMode.PUBLICATION
79

810
class LithicClientAsync private constructor(private val clientOptions: ClientOptions) {
9-
@get:JvmName("accounts")
10-
val accounts: AccountServiceAsync by lazy { AccountServiceAsync(clientOptions) }
11+
private val accounts: AccountServiceAsync by
12+
lazy(PUBLICATION) { AccountServiceAsyncImpl(clientOptions) }
13+
private val accountHolders: AccountHolderServiceAsync by
14+
lazy(PUBLICATION) { AccountHolderServiceAsyncImpl(clientOptions) }
15+
private val authRules: AuthRuleServiceAsync by
16+
lazy(PUBLICATION) { AuthRuleServiceAsyncImpl(clientOptions) }
17+
private val authStreamEnrollment: AuthStreamEnrollmentServiceAsync by
18+
lazy(PUBLICATION) { AuthStreamEnrollmentServiceAsyncImpl(clientOptions) }
19+
private val cards: CardServiceAsync by lazy(PUBLICATION) { CardServiceAsyncImpl(clientOptions) }
20+
private val fundingSources: FundingSourceServiceAsync by
21+
lazy(PUBLICATION) { FundingSourceServiceAsyncImpl(clientOptions) }
22+
private val transactions: TransactionServiceAsync by
23+
lazy(PUBLICATION) { TransactionServiceAsyncImpl(clientOptions) }
1124

12-
@get:JvmName("accountHolders")
13-
val accountHolders: AccountHolderServiceAsync by lazy {
14-
AccountHolderServiceAsync(clientOptions)
15-
}
25+
private val lithicClientInternalService: LithicClientInternalServiceAsyncImpl by
26+
lazy(PUBLICATION) { LithicClientInternalServiceAsyncImpl(clientOptions) }
1627

17-
@get:JvmName("authRules")
18-
val authRules: AuthRuleServiceAsync by lazy { AuthRuleServiceAsync(clientOptions) }
28+
fun accounts(): AccountServiceAsync = accounts
1929

20-
@get:JvmName("authStreamEnrollment")
21-
val authStreamEnrollment: AuthStreamEnrollmentServiceAsync by lazy {
22-
AuthStreamEnrollmentServiceAsync(clientOptions)
23-
}
30+
fun accountHolders(): AccountHolderServiceAsync = accountHolders
2431

25-
@get:JvmName("cards") val cards: CardServiceAsync by lazy { CardServiceAsync(clientOptions) }
32+
fun authRules(): AuthRuleServiceAsync = authRules
2633

27-
@get:JvmName("fundingSources")
28-
val fundingSources: FundingSourceServiceAsync by lazy {
29-
FundingSourceServiceAsync(clientOptions)
30-
}
34+
fun authStreamEnrollment(): AuthStreamEnrollmentServiceAsync = authStreamEnrollment
3135

32-
@get:JvmName("transactions")
33-
val transactions: TransactionServiceAsync by lazy { TransactionServiceAsync(clientOptions) }
36+
fun cards(): CardServiceAsync = cards
3437

35-
private val lithicClientInternalService: LithicClientInternalServiceAsync by lazy {
36-
LithicClientInternalServiceAsync(clientOptions)
37-
}
38+
fun fundingSources(): FundingSourceServiceAsync = fundingSources
39+
40+
fun transactions(): TransactionServiceAsync = transactions
41+
42+
fun lithicClientInternalService(): LithicClientInternalServiceAsync =
43+
lithicClientInternalService
44+
45+
/** API status check */
46+
fun apiStatus(params: ClientApiStatusParams) = lithicClientInternalService.apiStatus(params)
3847

3948
companion object {
4049
@JvmStatic fun builder() = Builder()
4150

4251
@JvmStatic fun fromEnv(): LithicClientAsync = builder().fromEnv().build()
4352
}
4453

45-
/** API status check */
46-
fun apiStatus(params: ClientApiStatusParams) = lithicClientInternalService.apiStatus(params)
47-
4854
class Builder {
4955
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
5056
private var baseUrl: String = ClientOptions.PRODUCTION_URL

lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountListPage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.lithic.api.core.JsonMissing
1010
import com.lithic.api.core.JsonValue
1111
import com.lithic.api.core.NoAutoDetect
1212
import com.lithic.api.core.toUnmodifiable
13-
import com.lithic.api.services.AccountService
13+
import com.lithic.api.services.blocking.AccountService
1414
import java.util.Objects
1515
import java.util.Optional
1616
import java.util.stream.Stream

lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountListPageAsync.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.lithic.api.core.JsonMissing
1010
import com.lithic.api.core.JsonValue
1111
import com.lithic.api.core.NoAutoDetect
1212
import com.lithic.api.core.toUnmodifiable
13-
import com.lithic.api.services.AccountServiceAsync
13+
import com.lithic.api.services.async.AccountServiceAsync
1414
import java.util.Objects
1515
import java.util.Optional
1616
import java.util.concurrent.CompletableFuture

lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.lithic.api.core.JsonMissing
1010
import com.lithic.api.core.JsonValue
1111
import com.lithic.api.core.NoAutoDetect
1212
import com.lithic.api.core.toUnmodifiable
13-
import com.lithic.api.services.AuthRuleService
13+
import com.lithic.api.services.blocking.AuthRuleService
1414
import java.util.Objects
1515
import java.util.Optional
1616
import java.util.stream.Stream

lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleListPageAsync.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.lithic.api.core.JsonMissing
1010
import com.lithic.api.core.JsonValue
1111
import com.lithic.api.core.NoAutoDetect
1212
import com.lithic.api.core.toUnmodifiable
13-
import com.lithic.api.services.AuthRuleServiceAsync
13+
import com.lithic.api.services.async.AuthRuleServiceAsync
1414
import java.util.Objects
1515
import java.util.Optional
1616
import java.util.concurrent.CompletableFuture

lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListPage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.lithic.api.core.JsonMissing
1010
import com.lithic.api.core.JsonValue
1111
import com.lithic.api.core.NoAutoDetect
1212
import com.lithic.api.core.toUnmodifiable
13-
import com.lithic.api.services.CardService
13+
import com.lithic.api.services.blocking.CardService
1414
import java.util.Objects
1515
import java.util.Optional
1616
import java.util.stream.Stream

lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListPageAsync.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.lithic.api.core.JsonMissing
1010
import com.lithic.api.core.JsonValue
1111
import com.lithic.api.core.NoAutoDetect
1212
import com.lithic.api.core.toUnmodifiable
13-
import com.lithic.api.services.CardServiceAsync
13+
import com.lithic.api.services.async.CardServiceAsync
1414
import java.util.Objects
1515
import java.util.Optional
1616
import java.util.concurrent.CompletableFuture

lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingSourceListPage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.lithic.api.core.JsonMissing
1010
import com.lithic.api.core.JsonValue
1111
import com.lithic.api.core.NoAutoDetect
1212
import com.lithic.api.core.toUnmodifiable
13-
import com.lithic.api.services.FundingSourceService
13+
import com.lithic.api.services.blocking.FundingSourceService
1414
import java.util.Objects
1515
import java.util.Optional
1616
import java.util.stream.Stream

lithic-java-core/src/main/kotlin/com/lithic/api/models/FundingSourceListPageAsync.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.lithic.api.core.JsonMissing
1010
import com.lithic.api.core.JsonValue
1111
import com.lithic.api.core.NoAutoDetect
1212
import com.lithic.api.core.toUnmodifiable
13-
import com.lithic.api.services.FundingSourceServiceAsync
13+
import com.lithic.api.services.async.FundingSourceServiceAsync
1414
import java.util.Objects
1515
import java.util.Optional
1616
import java.util.concurrent.CompletableFuture

0 commit comments

Comments
 (0)