Skip to content

Commit 1c80861

Browse files
release: 4.6.0 (#85)
* feat(client): add `HttpRequest#url()` method * feat: Add automation list endpoint to API spec * release: 4.6.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent b64740c commit 1c80861

19 files changed

Lines changed: 1629 additions & 11 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "4.5.0"
2+
".": "4.6.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 77
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-361d17797dff55a6d211dab1d2b797ff8674ebbb49a03f5ca0ab7292f8a88bdf.yml
3-
openapi_spec_hash: 6fdf1ea49bfaa98134463f366e9fb200
4-
config_hash: 54d2059f36ceee17804ef6c2800affd2
1+
configured_endpoints: 78
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-e3c16e3181f58323091b425c9ca546efdefbe4681255d611ff21de9050c249ee.yml
3+
openapi_spec_hash: 9cc15d56d3c522db4dce917cec791142
4+
config_hash: b8333ea2756bea772420159bf539b168

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 4.6.0 (2026-01-08)
4+
5+
Full Changelog: [v4.5.0...v4.6.0](https://github.com/trycourier/courier-java/compare/v4.5.0...v4.6.0)
6+
7+
### Features
8+
9+
* Add automation list endpoint to API spec ([d325774](https://github.com/trycourier/courier-java/commit/d32577416aac404f5252240814411027720f9b7e))
10+
* **client:** add `HttpRequest#url()` method ([68fea18](https://github.com/trycourier/courier-java/commit/68fea18aaff857c538d86a74f17c3655a7815817))
11+
312
## 4.5.0 (2025-12-29)
413

514
Full Changelog: [v4.4.0...v4.5.0](https://github.com/trycourier/courier-java/compare/v4.4.0...v4.5.0)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![Maven Central](https://img.shields.io/maven-central/v/com.courier/courier-java)](https://central.sonatype.com/artifact/com.courier/courier-java/4.5.0)
6-
[![javadoc](https://javadoc.io/badge2/com.courier/courier-java/4.5.0/javadoc.svg)](https://javadoc.io/doc/com.courier/courier-java/4.5.0)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.courier/courier-java)](https://central.sonatype.com/artifact/com.courier/courier-java/4.6.0)
6+
[![javadoc](https://javadoc.io/badge2/com.courier/courier-java/4.6.0/javadoc.svg)](https://javadoc.io/doc/com.courier/courier-java/4.6.0)
77

88
<!-- x-release-please-end -->
99

@@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/).
1313

1414
<!-- x-release-please-start-version -->
1515

16-
The REST API documentation can be found on [www.courier.com](https://www.courier.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.courier/courier-java/4.5.0).
16+
The REST API documentation can be found on [www.courier.com](https://www.courier.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.courier/courier-java/4.6.0).
1717

1818
<!-- x-release-please-end -->
1919

@@ -24,7 +24,7 @@ The REST API documentation can be found on [www.courier.com](https://www.courier
2424
### Gradle
2525

2626
```kotlin
27-
implementation("com.courier:courier-java:4.5.0")
27+
implementation("com.courier:courier-java:4.6.0")
2828
```
2929

3030
### Maven
@@ -33,7 +33,7 @@ implementation("com.courier:courier-java:4.5.0")
3333
<dependency>
3434
<groupId>com.courier</groupId>
3535
<artifactId>courier-java</artifactId>
36-
<version>4.5.0</version>
36+
<version>4.6.0</version>
3737
</dependency>
3838
```
3939

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88

99
allprojects {
1010
group = "com.courier"
11-
version = "4.5.0" // x-release-please-version
11+
version = "4.6.0" // x-release-please-version
1212
}
1313

1414
subprojects {

courier-java-core/src/main/kotlin/com/courier/core/http/HttpRequest.kt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.courier.core.http
22

33
import com.courier.core.checkRequired
44
import com.courier.core.toImmutable
5+
import java.net.URLEncoder
56

67
class HttpRequest
78
private constructor(
@@ -13,6 +14,35 @@ private constructor(
1314
@get:JvmName("body") val body: HttpRequestBody?,
1415
) {
1516

17+
fun url(): String = buildString {
18+
append(baseUrl)
19+
20+
pathSegments.forEach { segment ->
21+
if (!endsWith("/")) {
22+
append("/")
23+
}
24+
append(URLEncoder.encode(segment, "UTF-8"))
25+
}
26+
27+
if (queryParams.isEmpty()) {
28+
return@buildString
29+
}
30+
31+
append("?")
32+
var isFirst = true
33+
queryParams.keys().forEach { key ->
34+
queryParams.values(key).forEach { value ->
35+
if (!isFirst) {
36+
append("&")
37+
}
38+
append(URLEncoder.encode(key, "UTF-8"))
39+
append("=")
40+
append(URLEncoder.encode(value, "UTF-8"))
41+
isFirst = false
42+
}
43+
}
44+
}
45+
1646
fun toBuilder(): Builder = Builder().from(this)
1747

1848
override fun toString(): String =

0 commit comments

Comments
 (0)