Skip to content

Commit 5ba9c33

Browse files
feat(api): manual updates
added new endpoints
1 parent a80ec0b commit 5ba9c33

File tree

102 files changed

+25003
-2
lines changed

Some content is hidden

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

102 files changed

+25003
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 126
1+
configured_endpoints: 139
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c92fb451e13f157b3735f188acc8d57aa3adfbaac1683645e1ba4f432dd7a4f8.yml
33
openapi_spec_hash: dbcd87ecfbd3976eb3b99ec6f9fbc606
4-
config_hash: bcf82bddb691f6be773ac6cae8c03b9a
4+
config_hash: 3279841440b02d4e8303c961d6983492

orb-java-core/src/main/kotlin/com/withorb/api/client/OrbClient.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import com.withorb.api.services.blocking.EventService
1414
import com.withorb.api.services.blocking.InvoiceLineItemService
1515
import com.withorb.api.services.blocking.InvoiceService
1616
import com.withorb.api.services.blocking.ItemService
17+
import com.withorb.api.services.blocking.LicenseService
18+
import com.withorb.api.services.blocking.LicenseTypeService
1719
import com.withorb.api.services.blocking.MetricService
1820
import com.withorb.api.services.blocking.PlanService
1921
import com.withorb.api.services.blocking.PriceService
@@ -95,6 +97,10 @@ interface OrbClient {
9597

9698
fun creditBlocks(): CreditBlockService
9799

100+
fun licenseTypes(): LicenseTypeService
101+
102+
fun licenses(): LicenseService
103+
98104
/**
99105
* Closes this client, relinquishing any underlying resources.
100106
*
@@ -151,5 +157,9 @@ interface OrbClient {
151157
fun subscriptionChanges(): SubscriptionChangeService.WithRawResponse
152158

153159
fun creditBlocks(): CreditBlockService.WithRawResponse
160+
161+
fun licenseTypes(): LicenseTypeService.WithRawResponse
162+
163+
fun licenses(): LicenseService.WithRawResponse
154164
}
155165
}

orb-java-core/src/main/kotlin/com/withorb/api/client/OrbClientAsync.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import com.withorb.api.services.async.EventServiceAsync
1414
import com.withorb.api.services.async.InvoiceLineItemServiceAsync
1515
import com.withorb.api.services.async.InvoiceServiceAsync
1616
import com.withorb.api.services.async.ItemServiceAsync
17+
import com.withorb.api.services.async.LicenseServiceAsync
18+
import com.withorb.api.services.async.LicenseTypeServiceAsync
1719
import com.withorb.api.services.async.MetricServiceAsync
1820
import com.withorb.api.services.async.PlanServiceAsync
1921
import com.withorb.api.services.async.PriceServiceAsync
@@ -92,6 +94,10 @@ interface OrbClientAsync {
9294

9395
fun creditBlocks(): CreditBlockServiceAsync
9496

97+
fun licenseTypes(): LicenseTypeServiceAsync
98+
99+
fun licenses(): LicenseServiceAsync
100+
95101
/**
96102
* Closes this client, relinquishing any underlying resources.
97103
*
@@ -148,5 +154,9 @@ interface OrbClientAsync {
148154
fun subscriptionChanges(): SubscriptionChangeServiceAsync.WithRawResponse
149155

150156
fun creditBlocks(): CreditBlockServiceAsync.WithRawResponse
157+
158+
fun licenseTypes(): LicenseTypeServiceAsync.WithRawResponse
159+
160+
fun licenses(): LicenseServiceAsync.WithRawResponse
151161
}
152162
}

orb-java-core/src/main/kotlin/com/withorb/api/client/OrbClientAsyncImpl.kt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ import com.withorb.api.services.async.InvoiceServiceAsync
2626
import com.withorb.api.services.async.InvoiceServiceAsyncImpl
2727
import com.withorb.api.services.async.ItemServiceAsync
2828
import com.withorb.api.services.async.ItemServiceAsyncImpl
29+
import com.withorb.api.services.async.LicenseServiceAsync
30+
import com.withorb.api.services.async.LicenseServiceAsyncImpl
31+
import com.withorb.api.services.async.LicenseTypeServiceAsync
32+
import com.withorb.api.services.async.LicenseTypeServiceAsyncImpl
2933
import com.withorb.api.services.async.MetricServiceAsync
3034
import com.withorb.api.services.async.MetricServiceAsyncImpl
3135
import com.withorb.api.services.async.PlanServiceAsync
@@ -119,6 +123,14 @@ class OrbClientAsyncImpl(private val clientOptions: ClientOptions) : OrbClientAs
119123
CreditBlockServiceAsyncImpl(clientOptionsWithUserAgent)
120124
}
121125

126+
private val licenseTypes: LicenseTypeServiceAsync by lazy {
127+
LicenseTypeServiceAsyncImpl(clientOptionsWithUserAgent)
128+
}
129+
130+
private val licenses: LicenseServiceAsync by lazy {
131+
LicenseServiceAsyncImpl(clientOptionsWithUserAgent)
132+
}
133+
122134
override fun sync(): OrbClient = sync
123135

124136
override fun withRawResponse(): OrbClientAsync.WithRawResponse = withRawResponse
@@ -161,6 +173,10 @@ class OrbClientAsyncImpl(private val clientOptions: ClientOptions) : OrbClientAs
161173

162174
override fun creditBlocks(): CreditBlockServiceAsync = creditBlocks
163175

176+
override fun licenseTypes(): LicenseTypeServiceAsync = licenseTypes
177+
178+
override fun licenses(): LicenseServiceAsync = licenses
179+
164180
override fun close() = clientOptions.close()
165181

166182
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
@@ -235,6 +251,14 @@ class OrbClientAsyncImpl(private val clientOptions: ClientOptions) : OrbClientAs
235251
CreditBlockServiceAsyncImpl.WithRawResponseImpl(clientOptions)
236252
}
237253

254+
private val licenseTypes: LicenseTypeServiceAsync.WithRawResponse by lazy {
255+
LicenseTypeServiceAsyncImpl.WithRawResponseImpl(clientOptions)
256+
}
257+
258+
private val licenses: LicenseServiceAsync.WithRawResponse by lazy {
259+
LicenseServiceAsyncImpl.WithRawResponseImpl(clientOptions)
260+
}
261+
238262
override fun withOptions(
239263
modifier: Consumer<ClientOptions.Builder>
240264
): OrbClientAsync.WithRawResponse =
@@ -278,5 +302,9 @@ class OrbClientAsyncImpl(private val clientOptions: ClientOptions) : OrbClientAs
278302
subscriptionChanges
279303

280304
override fun creditBlocks(): CreditBlockServiceAsync.WithRawResponse = creditBlocks
305+
306+
override fun licenseTypes(): LicenseTypeServiceAsync.WithRawResponse = licenseTypes
307+
308+
override fun licenses(): LicenseServiceAsync.WithRawResponse = licenses
281309
}
282310
}

orb-java-core/src/main/kotlin/com/withorb/api/client/OrbClientImpl.kt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ import com.withorb.api.services.blocking.InvoiceService
2626
import com.withorb.api.services.blocking.InvoiceServiceImpl
2727
import com.withorb.api.services.blocking.ItemService
2828
import com.withorb.api.services.blocking.ItemServiceImpl
29+
import com.withorb.api.services.blocking.LicenseService
30+
import com.withorb.api.services.blocking.LicenseServiceImpl
31+
import com.withorb.api.services.blocking.LicenseTypeService
32+
import com.withorb.api.services.blocking.LicenseTypeServiceImpl
2933
import com.withorb.api.services.blocking.MetricService
3034
import com.withorb.api.services.blocking.MetricServiceImpl
3135
import com.withorb.api.services.blocking.PlanService
@@ -111,6 +115,12 @@ class OrbClientImpl(private val clientOptions: ClientOptions) : OrbClient {
111115
CreditBlockServiceImpl(clientOptionsWithUserAgent)
112116
}
113117

118+
private val licenseTypes: LicenseTypeService by lazy {
119+
LicenseTypeServiceImpl(clientOptionsWithUserAgent)
120+
}
121+
122+
private val licenses: LicenseService by lazy { LicenseServiceImpl(clientOptionsWithUserAgent) }
123+
114124
override fun async(): OrbClientAsync = async
115125

116126
override fun withRawResponse(): OrbClient.WithRawResponse = withRawResponse
@@ -154,6 +164,10 @@ class OrbClientImpl(private val clientOptions: ClientOptions) : OrbClient {
154164

155165
override fun creditBlocks(): CreditBlockService = creditBlocks
156166

167+
override fun licenseTypes(): LicenseTypeService = licenseTypes
168+
169+
override fun licenses(): LicenseService = licenses
170+
157171
override fun close() = clientOptions.close()
158172

159173
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
@@ -227,6 +241,14 @@ class OrbClientImpl(private val clientOptions: ClientOptions) : OrbClient {
227241
CreditBlockServiceImpl.WithRawResponseImpl(clientOptions)
228242
}
229243

244+
private val licenseTypes: LicenseTypeService.WithRawResponse by lazy {
245+
LicenseTypeServiceImpl.WithRawResponseImpl(clientOptions)
246+
}
247+
248+
private val licenses: LicenseService.WithRawResponse by lazy {
249+
LicenseServiceImpl.WithRawResponseImpl(clientOptions)
250+
}
251+
230252
override fun withOptions(
231253
modifier: Consumer<ClientOptions.Builder>
232254
): OrbClient.WithRawResponse =
@@ -269,5 +291,9 @@ class OrbClientImpl(private val clientOptions: ClientOptions) : OrbClient {
269291
subscriptionChanges
270292

271293
override fun creditBlocks(): CreditBlockService.WithRawResponse = creditBlocks
294+
295+
override fun licenseTypes(): LicenseTypeService.WithRawResponse = licenseTypes
296+
297+
override fun licenses(): LicenseService.WithRawResponse = licenses
272298
}
273299
}
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
// File generated from our OpenAPI spec by Stainless.
2+
3+
package com.withorb.api.models
4+
5+
import com.withorb.api.core.Params
6+
import com.withorb.api.core.http.Headers
7+
import com.withorb.api.core.http.QueryParams
8+
import java.util.Objects
9+
import java.util.Optional
10+
import kotlin.jvm.optionals.getOrNull
11+
12+
/**
13+
* This endpoint returns the credit block and its associated purchasing invoices.
14+
*
15+
* If a credit block was purchased (as opposed to being manually added or allocated from a
16+
* subscription), this endpoint returns the invoices that were created to charge the customer for
17+
* the credit block. For credit blocks with payment schedules spanning multiple periods (e.g.,
18+
* monthly payments over 12 months), multiple invoices will be returned.
19+
*
20+
* If the credit block was not purchased (e.g., manual increment, allocation), an empty invoices
21+
* list is returned.
22+
*
23+
* **Note: This endpoint is currently experimental and its interface may change in future releases.
24+
* Please contact support before building production integrations against this endpoint.**
25+
*/
26+
class CreditBlockListInvoicesParams
27+
private constructor(
28+
private val blockId: String?,
29+
private val additionalHeaders: Headers,
30+
private val additionalQueryParams: QueryParams,
31+
) : Params {
32+
33+
fun blockId(): Optional<String> = Optional.ofNullable(blockId)
34+
35+
/** Additional headers to send with the request. */
36+
fun _additionalHeaders(): Headers = additionalHeaders
37+
38+
/** Additional query param to send with the request. */
39+
fun _additionalQueryParams(): QueryParams = additionalQueryParams
40+
41+
fun toBuilder() = Builder().from(this)
42+
43+
companion object {
44+
45+
@JvmStatic fun none(): CreditBlockListInvoicesParams = builder().build()
46+
47+
/**
48+
* Returns a mutable builder for constructing an instance of
49+
* [CreditBlockListInvoicesParams].
50+
*/
51+
@JvmStatic fun builder() = Builder()
52+
}
53+
54+
/** A builder for [CreditBlockListInvoicesParams]. */
55+
class Builder internal constructor() {
56+
57+
private var blockId: String? = null
58+
private var additionalHeaders: Headers.Builder = Headers.builder()
59+
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
60+
61+
@JvmSynthetic
62+
internal fun from(creditBlockListInvoicesParams: CreditBlockListInvoicesParams) = apply {
63+
blockId = creditBlockListInvoicesParams.blockId
64+
additionalHeaders = creditBlockListInvoicesParams.additionalHeaders.toBuilder()
65+
additionalQueryParams = creditBlockListInvoicesParams.additionalQueryParams.toBuilder()
66+
}
67+
68+
fun blockId(blockId: String?) = apply { this.blockId = blockId }
69+
70+
/** Alias for calling [Builder.blockId] with `blockId.orElse(null)`. */
71+
fun blockId(blockId: Optional<String>) = blockId(blockId.getOrNull())
72+
73+
fun additionalHeaders(additionalHeaders: Headers) = apply {
74+
this.additionalHeaders.clear()
75+
putAllAdditionalHeaders(additionalHeaders)
76+
}
77+
78+
fun additionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
79+
this.additionalHeaders.clear()
80+
putAllAdditionalHeaders(additionalHeaders)
81+
}
82+
83+
fun putAdditionalHeader(name: String, value: String) = apply {
84+
additionalHeaders.put(name, value)
85+
}
86+
87+
fun putAdditionalHeaders(name: String, values: Iterable<String>) = apply {
88+
additionalHeaders.put(name, values)
89+
}
90+
91+
fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
92+
this.additionalHeaders.putAll(additionalHeaders)
93+
}
94+
95+
fun putAllAdditionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
96+
this.additionalHeaders.putAll(additionalHeaders)
97+
}
98+
99+
fun replaceAdditionalHeaders(name: String, value: String) = apply {
100+
additionalHeaders.replace(name, value)
101+
}
102+
103+
fun replaceAdditionalHeaders(name: String, values: Iterable<String>) = apply {
104+
additionalHeaders.replace(name, values)
105+
}
106+
107+
fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
108+
this.additionalHeaders.replaceAll(additionalHeaders)
109+
}
110+
111+
fun replaceAllAdditionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
112+
this.additionalHeaders.replaceAll(additionalHeaders)
113+
}
114+
115+
fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
116+
117+
fun removeAllAdditionalHeaders(names: Set<String>) = apply {
118+
additionalHeaders.removeAll(names)
119+
}
120+
121+
fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
122+
this.additionalQueryParams.clear()
123+
putAllAdditionalQueryParams(additionalQueryParams)
124+
}
125+
126+
fun additionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) = apply {
127+
this.additionalQueryParams.clear()
128+
putAllAdditionalQueryParams(additionalQueryParams)
129+
}
130+
131+
fun putAdditionalQueryParam(key: String, value: String) = apply {
132+
additionalQueryParams.put(key, value)
133+
}
134+
135+
fun putAdditionalQueryParams(key: String, values: Iterable<String>) = apply {
136+
additionalQueryParams.put(key, values)
137+
}
138+
139+
fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
140+
this.additionalQueryParams.putAll(additionalQueryParams)
141+
}
142+
143+
fun putAllAdditionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) =
144+
apply {
145+
this.additionalQueryParams.putAll(additionalQueryParams)
146+
}
147+
148+
fun replaceAdditionalQueryParams(key: String, value: String) = apply {
149+
additionalQueryParams.replace(key, value)
150+
}
151+
152+
fun replaceAdditionalQueryParams(key: String, values: Iterable<String>) = apply {
153+
additionalQueryParams.replace(key, values)
154+
}
155+
156+
fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
157+
this.additionalQueryParams.replaceAll(additionalQueryParams)
158+
}
159+
160+
fun replaceAllAdditionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) =
161+
apply {
162+
this.additionalQueryParams.replaceAll(additionalQueryParams)
163+
}
164+
165+
fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
166+
167+
fun removeAllAdditionalQueryParams(keys: Set<String>) = apply {
168+
additionalQueryParams.removeAll(keys)
169+
}
170+
171+
/**
172+
* Returns an immutable instance of [CreditBlockListInvoicesParams].
173+
*
174+
* Further updates to this [Builder] will not mutate the returned instance.
175+
*/
176+
fun build(): CreditBlockListInvoicesParams =
177+
CreditBlockListInvoicesParams(
178+
blockId,
179+
additionalHeaders.build(),
180+
additionalQueryParams.build(),
181+
)
182+
}
183+
184+
fun _pathParam(index: Int): String =
185+
when (index) {
186+
0 -> blockId ?: ""
187+
else -> ""
188+
}
189+
190+
override fun _headers(): Headers = additionalHeaders
191+
192+
override fun _queryParams(): QueryParams = additionalQueryParams
193+
194+
override fun equals(other: Any?): Boolean {
195+
if (this === other) {
196+
return true
197+
}
198+
199+
return other is CreditBlockListInvoicesParams &&
200+
blockId == other.blockId &&
201+
additionalHeaders == other.additionalHeaders &&
202+
additionalQueryParams == other.additionalQueryParams
203+
}
204+
205+
override fun hashCode(): Int = Objects.hash(blockId, additionalHeaders, additionalQueryParams)
206+
207+
override fun toString() =
208+
"CreditBlockListInvoicesParams{blockId=$blockId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
209+
}

0 commit comments

Comments
 (0)