Skip to content

Commit 7327186

Browse files
feat(client): allow omitting params object when none required (#501)
1 parent 47e6474 commit 7327186

File tree

100 files changed

+476
-129
lines changed

Some content is hidden

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

100 files changed

+476
-129
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,14 @@ interface LithicClient {
113113
/** Status of api */
114114
@JvmOverloads
115115
fun apiStatus(
116-
params: ClientApiStatusParams,
116+
params: ClientApiStatusParams = ClientApiStatusParams.none(),
117117
requestOptions: RequestOptions = RequestOptions.none(),
118118
): ApiStatus
119119

120+
/** Status of api */
121+
fun apiStatus(requestOptions: RequestOptions): ApiStatus =
122+
apiStatus(ClientApiStatusParams.none(), requestOptions)
123+
120124
/**
121125
* Closes this client, relinquishing any underlying resources.
122126
*

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,14 @@ interface LithicClientAsync {
114114
/** Status of api */
115115
@JvmOverloads
116116
fun apiStatus(
117-
params: ClientApiStatusParams,
117+
params: ClientApiStatusParams = ClientApiStatusParams.none(),
118118
requestOptions: RequestOptions = RequestOptions.none(),
119119
): CompletableFuture<ApiStatus>
120120

121+
/** Status of api */
122+
fun apiStatus(requestOptions: RequestOptions): CompletableFuture<ApiStatus> =
123+
apiStatus(ClientApiStatusParams.none(), requestOptions)
124+
121125
/**
122126
* Closes this client, relinquishing any underlying resources.
123127
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ private constructor(
116116

117117
companion object {
118118

119+
fun none(): AccountHolderListParams = builder().build()
120+
119121
@JvmStatic fun builder() = Builder()
120122
}
121123

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ private constructor(
7575

7676
companion object {
7777

78+
fun none(): AccountListParams = builder().build()
79+
7880
@JvmStatic fun builder() = Builder()
7981
}
8082

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ private constructor(
4444

4545
companion object {
4646

47+
fun none(): AggregateBalanceListParams = builder().build()
48+
4749
@JvmStatic fun builder() = Builder()
4850
}
4951

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ private constructor(
6363

6464
companion object {
6565

66+
fun none(): AuthRuleV2ListParams = builder().build()
67+
6668
@JvmStatic fun builder() = Builder()
6769
}
6870

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ private constructor(
3333

3434
companion object {
3535

36+
fun none(): AuthStreamEnrollmentRetrieveSecretParams = builder().build()
37+
3638
@JvmStatic fun builder() = Builder()
3739
}
3840

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ private constructor(
4242

4343
companion object {
4444

45+
fun none(): AuthStreamEnrollmentRotateSecretParams = builder().build()
46+
4547
@JvmStatic fun builder() = Builder()
4648
}
4749

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ private constructor(
6868

6969
companion object {
7070

71+
fun none(): BalanceListParams = builder().build()
72+
7173
@JvmStatic fun builder() = Builder()
7274
}
7375

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ private constructor(
114114

115115
companion object {
116116

117+
fun none(): BookTransferListParams = builder().build()
118+
117119
@JvmStatic fun builder() = Builder()
118120
}
119121

0 commit comments

Comments
 (0)