Skip to content

Commit beb9c74

Browse files
feat(client): expose request body setter and getter (#579)
1 parent 55b33e8 commit beb9c74

File tree

82 files changed

+722
-101
lines changed

Some content is hidden

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

82 files changed

+722
-101
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ private constructor(
201201
)
202202
}
203203

204-
@JvmSynthetic internal fun _body(): Body = body
204+
fun _body(): Body = body
205205

206206
override fun _headers(): Headers = additionalHeaders
207207

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@ private constructor(
139139
.toBuilder()
140140
}
141141

142+
/**
143+
* Sets the entire request body.
144+
*
145+
* This is generally only useful if you are already constructing the body separately.
146+
* Otherwise, it's more convenient to use the top-level setters instead:
147+
* - [documentUploadToken]
148+
* - [status]
149+
* - [acceptedEntityStatusReasons]
150+
* - [statusReason]
151+
*/
152+
fun body(body: SimulateEnrollmentDocumentReviewRequest) = apply {
153+
this.body = body.toBuilder()
154+
}
155+
142156
/** The account holder document upload which to perform the simulation upon. */
143157
fun documentUploadToken(documentUploadToken: String) = apply {
144158
body.documentUploadToken(documentUploadToken)
@@ -349,7 +363,7 @@ private constructor(
349363
)
350364
}
351365

352-
@JvmSynthetic internal fun _body(): SimulateEnrollmentDocumentReviewRequest = body
366+
fun _body(): SimulateEnrollmentDocumentReviewRequest = body
353367

354368
override fun _headers(): Headers = additionalHeaders
355369

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,17 @@ private constructor(
118118
accountHolderSimulateEnrollmentReviewParams.additionalQueryParams.toBuilder()
119119
}
120120

121+
/**
122+
* Sets the entire request body.
123+
*
124+
* This is generally only useful if you are already constructing the body separately.
125+
* Otherwise, it's more convenient to use the top-level setters instead:
126+
* - [accountHolderToken]
127+
* - [status]
128+
* - [statusReasons]
129+
*/
130+
fun body(body: SimulateEnrollmentReviewRequest) = apply { this.body = body.toBuilder() }
131+
121132
/** The account holder which to perform the simulation upon. */
122133
fun accountHolderToken(accountHolderToken: String) = apply {
123134
body.accountHolderToken(accountHolderToken)
@@ -303,7 +314,7 @@ private constructor(
303314
)
304315
}
305316

306-
@JvmSynthetic internal fun _body(): SimulateEnrollmentReviewRequest = body
317+
fun _body(): SimulateEnrollmentReviewRequest = body
307318

308319
override fun _headers(): Headers = additionalHeaders
309320

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private constructor(
230230
)
231231
}
232232

233-
@JvmSynthetic internal fun _body(): Body = body
233+
fun _body(): Body = body
234234

235235
fun _pathParam(index: Int): String =
236236
when (index) {

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,16 @@ private constructor(
124124
this.accountHolderToken = accountHolderToken
125125
}
126126

127+
/**
128+
* Sets the entire request body.
129+
*
130+
* This is generally only useful if you are already constructing the body separately.
131+
* Otherwise, it's more convenient to use the top-level setters instead:
132+
* - [documentType]
133+
* - [entityToken]
134+
*/
135+
fun body(body: Body) = apply { this.body = body.toBuilder() }
136+
127137
/** The type of document to upload */
128138
fun documentType(documentType: DocumentType) = apply { body.documentType(documentType) }
129139

@@ -290,7 +300,7 @@ private constructor(
290300
)
291301
}
292302

293-
@JvmSynthetic internal fun _body(): Body = body
303+
fun _body(): Body = body
294304

295305
fun _pathParam(index: Int): String =
296306
when (index) {

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,20 @@ private constructor(
164164

165165
fun accountToken(accountToken: String) = apply { this.accountToken = accountToken }
166166

167+
/**
168+
* Sets the entire request body.
169+
*
170+
* This is generally only useful if you are already constructing the body separately.
171+
* Otherwise, it's more convenient to use the top-level setters instead:
172+
* - [dailySpendLimit]
173+
* - [lifetimeSpendLimit]
174+
* - [monthlySpendLimit]
175+
* - [state]
176+
* - [verificationAddress]
177+
* - etc.
178+
*/
179+
fun body(body: Body) = apply { this.body = body.toBuilder() }
180+
167181
/**
168182
* Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a $1,000
169183
* limit). By default the daily spend limit is set to $1,250.
@@ -394,7 +408,7 @@ private constructor(
394408
)
395409
}
396410

397-
@JvmSynthetic internal fun _body(): Body = body
411+
fun _body(): Body = body
398412

399413
fun _pathParam(index: Int): String =
400414
when (index) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private constructor(
231231
)
232232
}
233233

234-
@JvmSynthetic internal fun _body(): Body = body
234+
fun _body(): Body = body
235235

236236
fun _pathParam(index: Int): String =
237237
when (index) {

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,16 @@ private constructor(
123123

124124
fun authRuleToken(authRuleToken: String) = apply { this.authRuleToken = authRuleToken }
125125

126+
/**
127+
* Sets the entire request body.
128+
*
129+
* This is generally only useful if you are already constructing the body separately.
130+
* Otherwise, it's more convenient to use the top-level setters instead:
131+
* - [end]
132+
* - [start]
133+
*/
134+
fun body(body: BacktestRequest) = apply { this.body = body.toBuilder() }
135+
126136
/** The end time of the backtest. */
127137
fun end(end: OffsetDateTime) = apply { body.end(end) }
128138

@@ -285,7 +295,7 @@ private constructor(
285295
)
286296
}
287297

288-
@JvmSynthetic internal fun _body(): BacktestRequest = body
298+
fun _body(): BacktestRequest = body
289299

290300
fun _pathParam(index: Int): String =
291301
when (index) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ private constructor(
218218
)
219219
}
220220

221-
@JvmSynthetic internal fun _body(): Body = body
221+
fun _body(): Body = body
222222

223223
override fun _headers(): Headers = additionalHeaders
224224

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,7 @@ private constructor(
203203
)
204204
}
205205

206-
@JvmSynthetic
207-
internal fun _body(): Optional<Map<String, JsonValue>> =
206+
fun _body(): Optional<Map<String, JsonValue>> =
208207
Optional.ofNullable(additionalBodyProperties.ifEmpty { null })
209208

210209
fun _pathParam(index: Int): String =

0 commit comments

Comments
 (0)