Skip to content

Commit 713f81e

Browse files
feat(api): add bulk card creation APIs
fix(api): extract several common types to reduce duplication
1 parent 7c3897e commit 713f81e

File tree

122 files changed

+11649
-7134
lines changed

Some content is hidden

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

122 files changed

+11649
-7134
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 172
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a9de2732e7a28b7fc5b8b7b171781d617337b6223d82ef7d6a554d0bd2b33bab.yml
3-
openapi_spec_hash: fc6111d286c7002cd854af23841d137e
4-
config_hash: cbad5dbbbeb0a85e4e3b70e5865a1900
1+
configured_endpoints: 176
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6d54fb5bba49d761acf9d62a7e105443a80a0d34dda61932ff1d1cb8fe214393.yml
3+
openapi_spec_hash: 20da53572fec9742df4a6d403464521b
4+
config_hash: ba3fbfc99a1b8635d9e79e9e49d12952

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import com.lithic.api.services.blocking.AuthRuleService
1616
import com.lithic.api.services.blocking.AuthStreamEnrollmentService
1717
import com.lithic.api.services.blocking.BalanceService
1818
import com.lithic.api.services.blocking.BookTransferService
19+
import com.lithic.api.services.blocking.CardBulkOrderService
1920
import com.lithic.api.services.blocking.CardProgramService
2021
import com.lithic.api.services.blocking.CardService
2122
import com.lithic.api.services.blocking.CreditProductService
@@ -28,6 +29,7 @@ import com.lithic.api.services.blocking.ExternalPaymentService
2829
import com.lithic.api.services.blocking.FinancialAccountService
2930
import com.lithic.api.services.blocking.FraudService
3031
import com.lithic.api.services.blocking.FundingEventService
32+
import com.lithic.api.services.blocking.InternalTransactionService
3133
import com.lithic.api.services.blocking.ManagementOperationService
3234
import com.lithic.api.services.blocking.NetworkProgramService
3335
import com.lithic.api.services.blocking.PaymentService
@@ -91,6 +93,8 @@ interface LithicClient {
9193

9294
fun cards(): CardService
9395

96+
fun cardBulkOrders(): CardBulkOrderService
97+
9498
fun balances(): BalanceService
9599

96100
fun aggregateBalances(): AggregateBalanceService
@@ -131,6 +135,8 @@ interface LithicClient {
131135

132136
fun managementOperations(): ManagementOperationService
133137

138+
fun internalTransaction(): InternalTransactionService
139+
134140
fun fundingEvents(): FundingEventService
135141

136142
fun fraud(): FraudService
@@ -193,6 +199,8 @@ interface LithicClient {
193199

194200
fun cards(): CardService.WithRawResponse
195201

202+
fun cardBulkOrders(): CardBulkOrderService.WithRawResponse
203+
196204
fun balances(): BalanceService.WithRawResponse
197205

198206
fun aggregateBalances(): AggregateBalanceService.WithRawResponse
@@ -231,6 +239,8 @@ interface LithicClient {
231239

232240
fun managementOperations(): ManagementOperationService.WithRawResponse
233241

242+
fun internalTransaction(): InternalTransactionService.WithRawResponse
243+
234244
fun fundingEvents(): FundingEventService.WithRawResponse
235245

236246
fun fraud(): FraudService.WithRawResponse

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import com.lithic.api.services.async.AuthRuleServiceAsync
1515
import com.lithic.api.services.async.AuthStreamEnrollmentServiceAsync
1616
import com.lithic.api.services.async.BalanceServiceAsync
1717
import com.lithic.api.services.async.BookTransferServiceAsync
18+
import com.lithic.api.services.async.CardBulkOrderServiceAsync
1819
import com.lithic.api.services.async.CardProgramServiceAsync
1920
import com.lithic.api.services.async.CardServiceAsync
2021
import com.lithic.api.services.async.CreditProductServiceAsync
@@ -27,6 +28,7 @@ import com.lithic.api.services.async.ExternalPaymentServiceAsync
2728
import com.lithic.api.services.async.FinancialAccountServiceAsync
2829
import com.lithic.api.services.async.FraudServiceAsync
2930
import com.lithic.api.services.async.FundingEventServiceAsync
31+
import com.lithic.api.services.async.InternalTransactionServiceAsync
3032
import com.lithic.api.services.async.ManagementOperationServiceAsync
3133
import com.lithic.api.services.async.NetworkProgramServiceAsync
3234
import com.lithic.api.services.async.PaymentServiceAsync
@@ -91,6 +93,8 @@ interface LithicClientAsync {
9193

9294
fun cards(): CardServiceAsync
9395

96+
fun cardBulkOrders(): CardBulkOrderServiceAsync
97+
9498
fun balances(): BalanceServiceAsync
9599

96100
fun aggregateBalances(): AggregateBalanceServiceAsync
@@ -131,6 +135,8 @@ interface LithicClientAsync {
131135

132136
fun managementOperations(): ManagementOperationServiceAsync
133137

138+
fun internalTransaction(): InternalTransactionServiceAsync
139+
134140
fun fundingEvents(): FundingEventServiceAsync
135141

136142
fun fraud(): FraudServiceAsync
@@ -196,6 +202,8 @@ interface LithicClientAsync {
196202

197203
fun cards(): CardServiceAsync.WithRawResponse
198204

205+
fun cardBulkOrders(): CardBulkOrderServiceAsync.WithRawResponse
206+
199207
fun balances(): BalanceServiceAsync.WithRawResponse
200208

201209
fun aggregateBalances(): AggregateBalanceServiceAsync.WithRawResponse
@@ -234,6 +242,8 @@ interface LithicClientAsync {
234242

235243
fun managementOperations(): ManagementOperationServiceAsync.WithRawResponse
236244

245+
fun internalTransaction(): InternalTransactionServiceAsync.WithRawResponse
246+
237247
fun fundingEvents(): FundingEventServiceAsync.WithRawResponse
238248

239249
fun fraud(): FraudServiceAsync.WithRawResponse

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ import com.lithic.api.services.async.BalanceServiceAsync
3333
import com.lithic.api.services.async.BalanceServiceAsyncImpl
3434
import com.lithic.api.services.async.BookTransferServiceAsync
3535
import com.lithic.api.services.async.BookTransferServiceAsyncImpl
36+
import com.lithic.api.services.async.CardBulkOrderServiceAsync
37+
import com.lithic.api.services.async.CardBulkOrderServiceAsyncImpl
3638
import com.lithic.api.services.async.CardProgramServiceAsync
3739
import com.lithic.api.services.async.CardProgramServiceAsyncImpl
3840
import com.lithic.api.services.async.CardServiceAsync
@@ -57,6 +59,8 @@ import com.lithic.api.services.async.FraudServiceAsync
5759
import com.lithic.api.services.async.FraudServiceAsyncImpl
5860
import com.lithic.api.services.async.FundingEventServiceAsync
5961
import com.lithic.api.services.async.FundingEventServiceAsyncImpl
62+
import com.lithic.api.services.async.InternalTransactionServiceAsync
63+
import com.lithic.api.services.async.InternalTransactionServiceAsyncImpl
6064
import com.lithic.api.services.async.ManagementOperationServiceAsync
6165
import com.lithic.api.services.async.ManagementOperationServiceAsyncImpl
6266
import com.lithic.api.services.async.NetworkProgramServiceAsync
@@ -125,6 +129,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
125129

126130
private val cards: CardServiceAsync by lazy { CardServiceAsyncImpl(clientOptionsWithUserAgent) }
127131

132+
private val cardBulkOrders: CardBulkOrderServiceAsync by lazy {
133+
CardBulkOrderServiceAsyncImpl(clientOptionsWithUserAgent)
134+
}
135+
128136
private val balances: BalanceServiceAsync by lazy {
129137
BalanceServiceAsyncImpl(clientOptionsWithUserAgent)
130138
}
@@ -203,6 +211,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
203211
ManagementOperationServiceAsyncImpl(clientOptionsWithUserAgent)
204212
}
205213

214+
private val internalTransaction: InternalTransactionServiceAsync by lazy {
215+
InternalTransactionServiceAsyncImpl(clientOptionsWithUserAgent)
216+
}
217+
206218
private val fundingEvents: FundingEventServiceAsync by lazy {
207219
FundingEventServiceAsyncImpl(clientOptionsWithUserAgent)
208220
}
@@ -241,6 +253,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
241253

242254
override fun cards(): CardServiceAsync = cards
243255

256+
override fun cardBulkOrders(): CardBulkOrderServiceAsync = cardBulkOrders
257+
244258
override fun balances(): BalanceServiceAsync = balances
245259

246260
override fun aggregateBalances(): AggregateBalanceServiceAsync = aggregateBalances
@@ -281,6 +295,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
281295

282296
override fun managementOperations(): ManagementOperationServiceAsync = managementOperations
283297

298+
override fun internalTransaction(): InternalTransactionServiceAsync = internalTransaction
299+
284300
override fun fundingEvents(): FundingEventServiceAsync = fundingEvents
285301

286302
override fun fraud(): FraudServiceAsync = fraud
@@ -333,6 +349,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
333349
CardServiceAsyncImpl.WithRawResponseImpl(clientOptions)
334350
}
335351

352+
private val cardBulkOrders: CardBulkOrderServiceAsync.WithRawResponse by lazy {
353+
CardBulkOrderServiceAsyncImpl.WithRawResponseImpl(clientOptions)
354+
}
355+
336356
private val balances: BalanceServiceAsync.WithRawResponse by lazy {
337357
BalanceServiceAsyncImpl.WithRawResponseImpl(clientOptions)
338358
}
@@ -409,6 +429,10 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
409429
ManagementOperationServiceAsyncImpl.WithRawResponseImpl(clientOptions)
410430
}
411431

432+
private val internalTransaction: InternalTransactionServiceAsync.WithRawResponse by lazy {
433+
InternalTransactionServiceAsyncImpl.WithRawResponseImpl(clientOptions)
434+
}
435+
412436
private val fundingEvents: FundingEventServiceAsync.WithRawResponse by lazy {
413437
FundingEventServiceAsyncImpl.WithRawResponseImpl(clientOptions)
414438
}
@@ -448,6 +472,8 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
448472

449473
override fun cards(): CardServiceAsync.WithRawResponse = cards
450474

475+
override fun cardBulkOrders(): CardBulkOrderServiceAsync.WithRawResponse = cardBulkOrders
476+
451477
override fun balances(): BalanceServiceAsync.WithRawResponse = balances
452478

453479
override fun aggregateBalances(): AggregateBalanceServiceAsync.WithRawResponse =
@@ -492,6 +518,9 @@ class LithicClientAsyncImpl(private val clientOptions: ClientOptions) : LithicCl
492518
override fun managementOperations(): ManagementOperationServiceAsync.WithRawResponse =
493519
managementOperations
494520

521+
override fun internalTransaction(): InternalTransactionServiceAsync.WithRawResponse =
522+
internalTransaction
523+
495524
override fun fundingEvents(): FundingEventServiceAsync.WithRawResponse = fundingEvents
496525

497526
override fun fraud(): FraudServiceAsync.WithRawResponse = fraud

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ import com.lithic.api.services.blocking.BalanceService
3333
import com.lithic.api.services.blocking.BalanceServiceImpl
3434
import com.lithic.api.services.blocking.BookTransferService
3535
import com.lithic.api.services.blocking.BookTransferServiceImpl
36+
import com.lithic.api.services.blocking.CardBulkOrderService
37+
import com.lithic.api.services.blocking.CardBulkOrderServiceImpl
3638
import com.lithic.api.services.blocking.CardProgramService
3739
import com.lithic.api.services.blocking.CardProgramServiceImpl
3840
import com.lithic.api.services.blocking.CardService
@@ -57,6 +59,8 @@ import com.lithic.api.services.blocking.FraudService
5759
import com.lithic.api.services.blocking.FraudServiceImpl
5860
import com.lithic.api.services.blocking.FundingEventService
5961
import com.lithic.api.services.blocking.FundingEventServiceImpl
62+
import com.lithic.api.services.blocking.InternalTransactionService
63+
import com.lithic.api.services.blocking.InternalTransactionServiceImpl
6064
import com.lithic.api.services.blocking.ManagementOperationService
6165
import com.lithic.api.services.blocking.ManagementOperationServiceImpl
6266
import com.lithic.api.services.blocking.NetworkProgramService
@@ -122,6 +126,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
122126

123127
private val cards: CardService by lazy { CardServiceImpl(clientOptionsWithUserAgent) }
124128

129+
private val cardBulkOrders: CardBulkOrderService by lazy {
130+
CardBulkOrderServiceImpl(clientOptionsWithUserAgent)
131+
}
132+
125133
private val balances: BalanceService by lazy { BalanceServiceImpl(clientOptionsWithUserAgent) }
126134

127135
private val aggregateBalances: AggregateBalanceService by lazy {
@@ -188,6 +196,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
188196
ManagementOperationServiceImpl(clientOptionsWithUserAgent)
189197
}
190198

199+
private val internalTransaction: InternalTransactionService by lazy {
200+
InternalTransactionServiceImpl(clientOptionsWithUserAgent)
201+
}
202+
191203
private val fundingEvents: FundingEventService by lazy {
192204
FundingEventServiceImpl(clientOptionsWithUserAgent)
193205
}
@@ -223,6 +235,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
223235

224236
override fun cards(): CardService = cards
225237

238+
override fun cardBulkOrders(): CardBulkOrderService = cardBulkOrders
239+
226240
override fun balances(): BalanceService = balances
227241

228242
override fun aggregateBalances(): AggregateBalanceService = aggregateBalances
@@ -263,6 +277,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
263277

264278
override fun managementOperations(): ManagementOperationService = managementOperations
265279

280+
override fun internalTransaction(): InternalTransactionService = internalTransaction
281+
266282
override fun fundingEvents(): FundingEventService = fundingEvents
267283

268284
override fun fraud(): FraudService = fraud
@@ -315,6 +331,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
315331
CardServiceImpl.WithRawResponseImpl(clientOptions)
316332
}
317333

334+
private val cardBulkOrders: CardBulkOrderService.WithRawResponse by lazy {
335+
CardBulkOrderServiceImpl.WithRawResponseImpl(clientOptions)
336+
}
337+
318338
private val balances: BalanceService.WithRawResponse by lazy {
319339
BalanceServiceImpl.WithRawResponseImpl(clientOptions)
320340
}
@@ -391,6 +411,10 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
391411
ManagementOperationServiceImpl.WithRawResponseImpl(clientOptions)
392412
}
393413

414+
private val internalTransaction: InternalTransactionService.WithRawResponse by lazy {
415+
InternalTransactionServiceImpl.WithRawResponseImpl(clientOptions)
416+
}
417+
394418
private val fundingEvents: FundingEventService.WithRawResponse by lazy {
395419
FundingEventServiceImpl.WithRawResponseImpl(clientOptions)
396420
}
@@ -430,6 +454,8 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
430454

431455
override fun cards(): CardService.WithRawResponse = cards
432456

457+
override fun cardBulkOrders(): CardBulkOrderService.WithRawResponse = cardBulkOrders
458+
433459
override fun balances(): BalanceService.WithRawResponse = balances
434460

435461
override fun aggregateBalances(): AggregateBalanceService.WithRawResponse =
@@ -473,6 +499,9 @@ class LithicClientImpl(private val clientOptions: ClientOptions) : LithicClient
473499
override fun managementOperations(): ManagementOperationService.WithRawResponse =
474500
managementOperations
475501

502+
override fun internalTransaction(): InternalTransactionService.WithRawResponse =
503+
internalTransaction
504+
476505
override fun fundingEvents(): FundingEventService.WithRawResponse = fundingEvents
477506

478507
override fun fraud(): FraudService.WithRawResponse = fraud

0 commit comments

Comments
 (0)