Skip to content

Commit 200a703

Browse files
feat(api): api update
1 parent ca80faf commit 200a703

7 files changed

Lines changed: 32 additions & 35 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 168
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury%2Fmodern-treasury-0ce652b3e366ad06fb79f38d20d1e5da6b2ea8540cb4d4c9364b713bfa8f7c5f.yml
3-
openapi_spec_hash: 2ccb77fe5311c8a5ef8c01e9d24a407b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury%2Fmodern-treasury-e1a2e03cd333ef4d88370b26f7dd190085a9f2afd08cc9f966443412f523f572.yml
3+
openapi_spec_hash: 5bb86075045e2498930d3e6752be0e97
44
config_hash: 9816850cabd20143ae1b50e5e9fe89ce

modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/services/async/IncomingPaymentDetailServiceAsync.kt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package com.moderntreasury.api.services.async
55
import com.moderntreasury.api.core.ClientOptions
66
import com.moderntreasury.api.core.RequestOptions
77
import com.moderntreasury.api.core.http.HttpResponseFor
8-
import com.moderntreasury.api.models.AsyncResponse
98
import com.moderntreasury.api.models.IncomingPaymentDetail
109
import com.moderntreasury.api.models.IncomingPaymentDetailCreateAsyncParams
1110
import com.moderntreasury.api.models.IncomingPaymentDetailListPageAsync
@@ -123,24 +122,24 @@ interface IncomingPaymentDetailServiceAsync {
123122
list(IncomingPaymentDetailListParams.none(), requestOptions)
124123

125124
/** Simulate Incoming Payment Detail */
126-
fun createAsync(): CompletableFuture<AsyncResponse> =
125+
fun createAsync(): CompletableFuture<IncomingPaymentDetail> =
127126
createAsync(IncomingPaymentDetailCreateAsyncParams.none())
128127

129128
/** @see createAsync */
130129
fun createAsync(
131130
params: IncomingPaymentDetailCreateAsyncParams =
132131
IncomingPaymentDetailCreateAsyncParams.none(),
133132
requestOptions: RequestOptions = RequestOptions.none(),
134-
): CompletableFuture<AsyncResponse>
133+
): CompletableFuture<IncomingPaymentDetail>
135134

136135
/** @see createAsync */
137136
fun createAsync(
138137
params: IncomingPaymentDetailCreateAsyncParams =
139138
IncomingPaymentDetailCreateAsyncParams.none()
140-
): CompletableFuture<AsyncResponse> = createAsync(params, RequestOptions.none())
139+
): CompletableFuture<IncomingPaymentDetail> = createAsync(params, RequestOptions.none())
141140

142141
/** @see createAsync */
143-
fun createAsync(requestOptions: RequestOptions): CompletableFuture<AsyncResponse> =
142+
fun createAsync(requestOptions: RequestOptions): CompletableFuture<IncomingPaymentDetail> =
144143
createAsync(IncomingPaymentDetailCreateAsyncParams.none(), requestOptions)
145144

146145
/**
@@ -271,27 +270,27 @@ interface IncomingPaymentDetailServiceAsync {
271270
* /api/simulations/incoming_payment_details/create_async`, but is otherwise the same as
272271
* [IncomingPaymentDetailServiceAsync.createAsync].
273272
*/
274-
fun createAsync(): CompletableFuture<HttpResponseFor<AsyncResponse>> =
273+
fun createAsync(): CompletableFuture<HttpResponseFor<IncomingPaymentDetail>> =
275274
createAsync(IncomingPaymentDetailCreateAsyncParams.none())
276275

277276
/** @see createAsync */
278277
fun createAsync(
279278
params: IncomingPaymentDetailCreateAsyncParams =
280279
IncomingPaymentDetailCreateAsyncParams.none(),
281280
requestOptions: RequestOptions = RequestOptions.none(),
282-
): CompletableFuture<HttpResponseFor<AsyncResponse>>
281+
): CompletableFuture<HttpResponseFor<IncomingPaymentDetail>>
283282

284283
/** @see createAsync */
285284
fun createAsync(
286285
params: IncomingPaymentDetailCreateAsyncParams =
287286
IncomingPaymentDetailCreateAsyncParams.none()
288-
): CompletableFuture<HttpResponseFor<AsyncResponse>> =
287+
): CompletableFuture<HttpResponseFor<IncomingPaymentDetail>> =
289288
createAsync(params, RequestOptions.none())
290289

291290
/** @see createAsync */
292291
fun createAsync(
293292
requestOptions: RequestOptions
294-
): CompletableFuture<HttpResponseFor<AsyncResponse>> =
293+
): CompletableFuture<HttpResponseFor<IncomingPaymentDetail>> =
295294
createAsync(IncomingPaymentDetailCreateAsyncParams.none(), requestOptions)
296295
}
297296
}

modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/services/async/IncomingPaymentDetailServiceAsyncImpl.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import com.moderntreasury.api.core.http.HttpResponseFor
1616
import com.moderntreasury.api.core.http.json
1717
import com.moderntreasury.api.core.http.parseable
1818
import com.moderntreasury.api.core.prepareAsync
19-
import com.moderntreasury.api.models.AsyncResponse
2019
import com.moderntreasury.api.models.IncomingPaymentDetail
2120
import com.moderntreasury.api.models.IncomingPaymentDetailCreateAsyncParams
2221
import com.moderntreasury.api.models.IncomingPaymentDetailListPageAsync
@@ -68,7 +67,7 @@ internal constructor(private val clientOptions: ClientOptions) : IncomingPayment
6867
override fun createAsync(
6968
params: IncomingPaymentDetailCreateAsyncParams,
7069
requestOptions: RequestOptions,
71-
): CompletableFuture<AsyncResponse> =
70+
): CompletableFuture<IncomingPaymentDetail> =
7271
// post /api/simulations/incoming_payment_details/create_async
7372
withRawResponse().createAsync(params, requestOptions).thenApply { it.parse() }
7473

@@ -191,13 +190,13 @@ internal constructor(private val clientOptions: ClientOptions) : IncomingPayment
191190
}
192191
}
193192

194-
private val createAsyncHandler: Handler<AsyncResponse> =
195-
jsonHandler<AsyncResponse>(clientOptions.jsonMapper)
193+
private val createAsyncHandler: Handler<IncomingPaymentDetail> =
194+
jsonHandler<IncomingPaymentDetail>(clientOptions.jsonMapper)
196195

197196
override fun createAsync(
198197
params: IncomingPaymentDetailCreateAsyncParams,
199198
requestOptions: RequestOptions,
200-
): CompletableFuture<HttpResponseFor<AsyncResponse>> {
199+
): CompletableFuture<HttpResponseFor<IncomingPaymentDetail>> {
201200
val request =
202201
HttpRequest.builder()
203202
.method(HttpMethod.POST)

modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/services/blocking/IncomingPaymentDetailService.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import com.google.errorprone.annotations.MustBeClosed
66
import com.moderntreasury.api.core.ClientOptions
77
import com.moderntreasury.api.core.RequestOptions
88
import com.moderntreasury.api.core.http.HttpResponseFor
9-
import com.moderntreasury.api.models.AsyncResponse
109
import com.moderntreasury.api.models.IncomingPaymentDetail
1110
import com.moderntreasury.api.models.IncomingPaymentDetailCreateAsyncParams
1211
import com.moderntreasury.api.models.IncomingPaymentDetailListPage
@@ -110,23 +109,24 @@ interface IncomingPaymentDetailService {
110109
list(IncomingPaymentDetailListParams.none(), requestOptions)
111110

112111
/** Simulate Incoming Payment Detail */
113-
fun createAsync(): AsyncResponse = createAsync(IncomingPaymentDetailCreateAsyncParams.none())
112+
fun createAsync(): IncomingPaymentDetail =
113+
createAsync(IncomingPaymentDetailCreateAsyncParams.none())
114114

115115
/** @see createAsync */
116116
fun createAsync(
117117
params: IncomingPaymentDetailCreateAsyncParams =
118118
IncomingPaymentDetailCreateAsyncParams.none(),
119119
requestOptions: RequestOptions = RequestOptions.none(),
120-
): AsyncResponse
120+
): IncomingPaymentDetail
121121

122122
/** @see createAsync */
123123
fun createAsync(
124124
params: IncomingPaymentDetailCreateAsyncParams =
125125
IncomingPaymentDetailCreateAsyncParams.none()
126-
): AsyncResponse = createAsync(params, RequestOptions.none())
126+
): IncomingPaymentDetail = createAsync(params, RequestOptions.none())
127127

128128
/** @see createAsync */
129-
fun createAsync(requestOptions: RequestOptions): AsyncResponse =
129+
fun createAsync(requestOptions: RequestOptions): IncomingPaymentDetail =
130130
createAsync(IncomingPaymentDetailCreateAsyncParams.none(), requestOptions)
131131

132132
/**
@@ -267,7 +267,7 @@ interface IncomingPaymentDetailService {
267267
* [IncomingPaymentDetailService.createAsync].
268268
*/
269269
@MustBeClosed
270-
fun createAsync(): HttpResponseFor<AsyncResponse> =
270+
fun createAsync(): HttpResponseFor<IncomingPaymentDetail> =
271271
createAsync(IncomingPaymentDetailCreateAsyncParams.none())
272272

273273
/** @see createAsync */
@@ -276,18 +276,18 @@ interface IncomingPaymentDetailService {
276276
params: IncomingPaymentDetailCreateAsyncParams =
277277
IncomingPaymentDetailCreateAsyncParams.none(),
278278
requestOptions: RequestOptions = RequestOptions.none(),
279-
): HttpResponseFor<AsyncResponse>
279+
): HttpResponseFor<IncomingPaymentDetail>
280280

281281
/** @see createAsync */
282282
@MustBeClosed
283283
fun createAsync(
284284
params: IncomingPaymentDetailCreateAsyncParams =
285285
IncomingPaymentDetailCreateAsyncParams.none()
286-
): HttpResponseFor<AsyncResponse> = createAsync(params, RequestOptions.none())
286+
): HttpResponseFor<IncomingPaymentDetail> = createAsync(params, RequestOptions.none())
287287

288288
/** @see createAsync */
289289
@MustBeClosed
290-
fun createAsync(requestOptions: RequestOptions): HttpResponseFor<AsyncResponse> =
290+
fun createAsync(requestOptions: RequestOptions): HttpResponseFor<IncomingPaymentDetail> =
291291
createAsync(IncomingPaymentDetailCreateAsyncParams.none(), requestOptions)
292292
}
293293
}

modern-treasury-java-core/src/main/kotlin/com/moderntreasury/api/services/blocking/IncomingPaymentDetailServiceImpl.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import com.moderntreasury.api.core.http.HttpResponseFor
1616
import com.moderntreasury.api.core.http.json
1717
import com.moderntreasury.api.core.http.parseable
1818
import com.moderntreasury.api.core.prepare
19-
import com.moderntreasury.api.models.AsyncResponse
2019
import com.moderntreasury.api.models.IncomingPaymentDetail
2120
import com.moderntreasury.api.models.IncomingPaymentDetailCreateAsyncParams
2221
import com.moderntreasury.api.models.IncomingPaymentDetailListPage
@@ -64,7 +63,7 @@ internal constructor(private val clientOptions: ClientOptions) : IncomingPayment
6463
override fun createAsync(
6564
params: IncomingPaymentDetailCreateAsyncParams,
6665
requestOptions: RequestOptions,
67-
): AsyncResponse =
66+
): IncomingPaymentDetail =
6867
// post /api/simulations/incoming_payment_details/create_async
6968
withRawResponse().createAsync(params, requestOptions).parse()
7069

@@ -177,13 +176,13 @@ internal constructor(private val clientOptions: ClientOptions) : IncomingPayment
177176
}
178177
}
179178

180-
private val createAsyncHandler: Handler<AsyncResponse> =
181-
jsonHandler<AsyncResponse>(clientOptions.jsonMapper)
179+
private val createAsyncHandler: Handler<IncomingPaymentDetail> =
180+
jsonHandler<IncomingPaymentDetail>(clientOptions.jsonMapper)
182181

183182
override fun createAsync(
184183
params: IncomingPaymentDetailCreateAsyncParams,
185184
requestOptions: RequestOptions,
186-
): HttpResponseFor<AsyncResponse> {
185+
): HttpResponseFor<IncomingPaymentDetail> {
187186
val request =
188187
HttpRequest.builder()
189188
.method(HttpMethod.POST)

modern-treasury-java-core/src/test/kotlin/com/moderntreasury/api/services/async/IncomingPaymentDetailServiceAsyncTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ internal class IncomingPaymentDetailServiceAsyncTest {
8383
.build()
8484
val incomingPaymentDetailServiceAsync = client.incomingPaymentDetails()
8585

86-
val asyncResponseFuture =
86+
val incomingPaymentDetailFuture =
8787
incomingPaymentDetailServiceAsync.createAsync(
8888
IncomingPaymentDetailCreateAsyncParams.builder()
8989
.amount(0L)
@@ -98,7 +98,7 @@ internal class IncomingPaymentDetailServiceAsyncTest {
9898
.build()
9999
)
100100

101-
val asyncResponse = asyncResponseFuture.get()
102-
asyncResponse.validate()
101+
val incomingPaymentDetail = incomingPaymentDetailFuture.get()
102+
incomingPaymentDetail.validate()
103103
}
104104
}

modern-treasury-java-core/src/test/kotlin/com/moderntreasury/api/services/blocking/IncomingPaymentDetailServiceTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ internal class IncomingPaymentDetailServiceTest {
8080
.build()
8181
val incomingPaymentDetailService = client.incomingPaymentDetails()
8282

83-
val asyncResponse =
83+
val incomingPaymentDetail =
8484
incomingPaymentDetailService.createAsync(
8585
IncomingPaymentDetailCreateAsyncParams.builder()
8686
.amount(0L)
@@ -95,6 +95,6 @@ internal class IncomingPaymentDetailServiceTest {
9595
.build()
9696
)
9797

98-
asyncResponse.validate()
98+
incomingPaymentDetail.validate()
9999
}
100100
}

0 commit comments

Comments
 (0)